this is the test in my provider, sometimes it retu...
# pact-js
n
this is the test in my provider, sometimes it returns a timeout error, is that a bug?
m
What timeout is kicking in - the JS framework or a timeout from Pact? Usually if it's the test framework you need to bump it to match how long you expect verification to take. If it's the latter maybe the verification is too slow? Mind sharing the error?
n
ok let me try it again cause it just happened sometimes
👍 1
random
m
What test framework are you using - jest? If it’s random, given tests aren’t going to run deterministically speed-wise, it might just occasionally pass the default threshold (5s I think). We usually have something like this in the jest examples:
jest --runInBand --detectOpenHandles --forceExit -i --testTimeout 30000 <path to test>
n
yes, it's jest and also exceed the 5s
m
Ah, good to know. 5s is quite low - the idea of that timeout is a “per test” timeout. But if you think about the verification process there are technically lots of tests hidden within the test. You should be safe enough to extend this as your verification test suite grows
n
ya I think extend to 12s is good
it doesn't happen now
nice 7771 1