Make cameraMoveEvent spec more stable #7496
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the final step in resolving the commonly occurring test failures on Travis (#7249 (comment)). I will bump this PR to @lilleyse once run a couple times to verify that it no longer breaks.
I figured out the reason why there were two
render()
calls in that spec, and documented it for posterity. I had to sets.cameraEventWaitTime
to-1.0
because View.checkForCameraUpdates does not use Scene time to check this, it uses an absolute timestamp:https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/View.js#L118-L138
So it's very likely that this line:
Resolves to
getTimestamp() - this._cameraMovedTime
equal to 0. So even withscene.cameraEventWaitTime = 0.0
it doesn't run. The reason why I think settingcameraEventWaitTime
to negative in this spec is acceptable is because we want it to occur as soon as possible on the next frame, so this will take care of this edge case. Changing this equality to>=
should fix it as well but this seems like a safer change to make.Number of times successfully ran in Travis in a row: 4