iijlab / direct-hs

Client library for https://direct4b.com in Haskell
8 stars 1 forks source link

skews-0.1.0.3 tests fail #101

Closed maksbotan closed 4 years ago

maksbotan commented 4 years ago

I tried to run tests on newly released 0.1.0.3 and they failed.

skews> test (suite: mock-ws-server-test)

Network.WebSockets.Skews
  After running Skews.start and starting a client
    after enqueResponses and setDefaultResponse, responds with the given responses and records request
    sendToClients delivers the given message to all connected clients FAILED [1]
    can record requests sent concurrently FAILED [2]

Failures:

  test/Network/WebSockets/SkewsSpec.hs:85:5: 
  1) Network.WebSockets.Skews, After running Skews.start and starting a client, sendToClients delivers the given message to all connected clients
       uncaught exception: ConnectionException
       ConnectionClosed

  To rerun use: --match "/Network.WebSockets.Skews/After running Skews.start and starting a client/sendToClients delivers the given message to all connected clients/"

  test/Network/WebSockets/SkewsSpec.hs:98:5: 
  2) Network.WebSockets.Skews, After running Skews.start and starting a client, can record requests sent concurrently
       uncaught exception: IOException of type ResourceVanished
       writev: resource vanished (Broken pipe)

  To rerun use: --match "/Network.WebSockets.Skews/After running Skews.start and starting a client/can record requests sent concurrently/"

Randomized with seed 29278318

Finished in 0.0557 seconds
3 examples, 2 failures
igrep commented 4 years ago

Unfortunately, the tests of skews depend heavily on timing. So the tests may and may not fail depending on the environment and the duration of threadDelay. (I wonder why they used to pass...)

So please skip the tests on stackage!

maksbotan commented 4 years ago

Okay, I've already done that. Thanks!