mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fix inconsistent verifier results when run with multiple levels batched
This commit is contained in:
parent
88bd74a5a5
commit
cd47a9d4ea
1 changed files with 5 additions and 3 deletions
|
@ -25,9 +25,9 @@ module.exports = class VerifierTest extends CocoClass
|
|||
@loadStartTime = new Date()
|
||||
@god = new God maxAngels: 1, headless: true
|
||||
@levelLoader = new LevelLoader supermodel: @supermodel, levelID: @levelID, headless: true, fakeSessionConfig: {codeLanguage: @language, callback: @configureSession}
|
||||
@listenToOnce @levelLoader, 'world-necessities-loaded', @onWorldNecessitiesLoaded
|
||||
@listenToOnce @levelLoader, 'world-necessities-loaded', -> _.defer @onWorldNecessitiesLoaded
|
||||
|
||||
onWorldNecessitiesLoaded: ->
|
||||
onWorldNecessitiesLoaded: =>
|
||||
# Called when we have enough to build the world, but not everything is loaded
|
||||
@grabLevelLoaderData()
|
||||
|
||||
|
@ -134,8 +134,10 @@ module.exports = class VerifierTest extends CocoClass
|
|||
setTimeout @cleanup, 100
|
||||
|
||||
cleanup: =>
|
||||
if @levelLoader
|
||||
@stopListening @levelLoader
|
||||
@levelLoader.destroy()
|
||||
if @god
|
||||
@stopListening @god
|
||||
@god.destroy()
|
||||
|
||||
@world = null
|
||||
|
|
Loading…
Reference in a new issue