Closed Naktibalda closed 6 years ago
The contents of the testmybot.json file is ignored in this case, so this is not the problem.
What happens when you enable logging ("export DEBUG=*") before running it ?
It looks like a very short timeout: (I removed some sensitive parts of output)
2018-01-03T15:06:21.404Z mocha:runnable timeout 60000
tmb.beforeEach
INFO: running testcase Ask FAQ question
DEBUG: Ask FAQ question: user says Where do you ship to?
2018-01-03T15:06:21.418Z watson-middleware:index Creating Conversation object with parameters: {
...
2018-01-03T15:06:21.419Z watson-middleware:utils User: me, Context: null
DEBUG: Ask FAQ question: wait for bot says (channel: null)
2018-01-03T15:06:21.422Z watson-middleware:utils Conversation Request: {
...
}
INFO: Ask FAQ question failed: Error: Queue.pop timeout after undefined
at QueueTimeoutError (...\node_modules\botium-core\src\helpers\QueueTimeoutError.js:3:5)
at timeoutRequest (...\node_modules\botium-core\src\helpers\Queue.js:46:18)
at Timeout.timeoutCallback [as _onTimeout] (...\node_modules\async\dist\async.js:4922:13)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
1) Ask FAQ question
2018-01-03T15:06:21.430Z mocha:runnable timeout 60000
So it looks like timeout happens in less than 0.11s
thanks for the analysis, there is definitly something wrong with the timouts. I won't merge your commit now as I want to do some more analysis and solve this another way - there should be meaningful default timeout values in place.
by the way, I noticed that you are using IBM watson - there is a sample on how to connect to the watson conversation service with testmybot.
I've seen watson in your pull request, but for me it is important to test botkit part too.
Would it be possible to make timeout configurable?
yes, will be configurable with a meaningful default ("undefined" is not meaningful ...)
The "wireWithBotkit" helper now has a second argument, the timeout to use (default: 5 seconds).
Thanks, it works now.
second argument of wireWithBotkit works too.
I have tried to upgrade my botkit project to use testmybot 1.0.0 But whenever I run tests they fail with timeout:
Do I need to modify my testmybot.json file? It still contains
just like https://github.com/codeforequity-at/testmybot/blob/master/samples/botkit/jasmine/testmybot.json
My testmybot.spec.js contains this code:
It worked before, the diff is: