mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 19:52:56 +00:00
modify DispatchManager test to allow for slow shutdown
This commit is contained in:
parent
57f6919485
commit
85eab2e967
1 changed files with 10 additions and 8 deletions
|
@ -63,11 +63,13 @@ describe "DispatchManager", ->
|
|||
|
||||
|
||||
@worker.run()
|
||||
|
||||
setTimeout () =>
|
||||
@worker._waitForUpdateThenDispatchWorker.callCount.should.equal 3
|
||||
done()
|
||||
, 100
|
||||
|
||||
|
||||
|
||||
|
||||
checkStatus = () =>
|
||||
if not @settings.shuttingDown # retry until shutdown
|
||||
setTimeout checkStatus, 100
|
||||
return
|
||||
else
|
||||
@worker._waitForUpdateThenDispatchWorker.callCount.should.equal 3
|
||||
done()
|
||||
|
||||
checkStatus()
|
||||
|
|
Loading…
Reference in a new issue