Closed HeavyHorst closed 7 years ago
Perhaps we could change the transport test to:
func Transport(t *testing.T, func() vice.Transport)
That way, the function could create the transport and we could call it twice from within there?
I prefer this because, in theory, we might add more test functions later.
That should work. I can put a pull request together if you like.
That would be great.
Also, we should probably use t.Run
for each function.
Did this fix it?
With #9 i can't reproduce this anymore.
This function
uses the same transport for both tests.The first test stops the transport at the end, which is followed by some closed channels.
I get some flaky tests in the nats client code:
That is because the t.stopPubChan is already closed.
Maybe we should export these 2 functions
so that every queue can run these tests with a new transport.