haskell-distributed / haskell-distributed/distributed-process
testConnectToSelf failing
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 751
- Forks
- 99
- Avg merge
- 45m
- Merged PRs (30d)
- 2
Description
On line 451 of TestTransport.hs :
https://github.com/haskell-distributed/distributed-process/blob/edsko/network-transport-2/tests/TestTransport.hs#L451
If I add another line beneath this, so that two connections are made between an endpoint and its own address, then the 'testConnectToSelf' fails. e.g.
testConnectToSelf :: Transport -> Int -> IO ()
testConnectToSelf transport numPings = do
done <- newEmptyMVar
Right endpoint <- newEndPoint transport
tlog "Creating self-connection"
Right conn <- connect endpoint (address endpoint) ReliableOrdered
Right dummyConn1 <- connect endpoint (address endpoint) ReliableOrdered
It is throwning an error for line 473 :
https://github.com/haskell-distributed/distributed-process/blob/edsko/network-transport-2/tests/TestTransport.hs#L473
where (Received cid' msg) is not correctly being pattern matched:
Running "ConnectToSelf": failed (exception: TestTransport.hs:473:46-99: Non-exhaustive patterns in lambda
So - having multiple connections from an endpoint to its address appears to be causing problems.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tests/TestTransport.hs around lines 451 and 473 and run the ConnectToSelf test. Reproduce the failure by making two connections from an endpoint to its own address, then trace the received-message pattern matching. Done means testConnectToSelf passes with multiple self-connections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- distributed-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100