Fix inconsistent verifier results when run with multiple levels batched

This commit is contained in:
Nick Winter 2016-07-11 16:59:00 -07:00
parent 88bd74a5a5
commit cd47a9d4ea

View file

@ -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