phetsims / hookes-law

"Hooke's Law" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

CT: Assertion failed: right must be > left #85

Closed pixelzoom closed 8 months ago

pixelzoom commented 9 months ago

After addressing missing dependencies in https://github.com/phetsims/hookes-law/issues/84 and https://github.com/phetsims/axon/issues/441, CT is now reporting:

hookes-law : fuzz : unbuilt : listenerOrderRandom
http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/hookes-law/hookes-law_en.html?continuousTest=%7B%22test%22%3A%5B%22hookes-law%22%2C%22fuzz%22%2C%22unbuilt%22%2C%22listenerOrderRandom%22%5D%2C%22snapshotName%22%3A%22snapshot-1700341783704%22%2C%22timestamp%22%3A1700343429140%7D&brand=phet&ea&fuzz&listenerOrder=random
Query: brand=phet&ea&fuzz&listenerOrder=random
Uncaught Error: Assertion failed: right must be > left, right=0.5, left=0.75
Error: Assertion failed: right must be > left, right=0.5, left=0.75
at window.assertions.assertFunction (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/assert/js/assert.js:28:13)
at assert (Spring.ts:247:18)
at derivation (DerivedProperty.ts:51:11)
at getDerivedValue (DerivedProperty.ts:174:17)
at listener (TinyEmitter.ts:123:8)
at emit (ReadOnlyProperty.ts:329:22)
at _notifyListeners (ReadOnlyProperty.ts:276:13)
at unguardedSet (ReadOnlyProperty.ts:260:11)
at set (Property.ts:54:10)
at (SeriesSystem.ts:116:41)
[URL] http://128.138.93.172/continuous-testing/aqua/html/sim-test.html?url=..%2F..%2Fct-snapshots%2F1700341783704%2Fhookes-law%2Fhookes-law_en.html&simQueryParameters=brand%3Dphet%26ea%26fuzz%26listenerOrder%3Drandom&testInfo=%7B%22test%22%3A%5B%22hookes-law%22%2C%22fuzz%22%2C%22unbuilt%22%2C%22listenerOrderRandom%22%5D%2C%22snapshotName%22%3A%22snapshot-1700341783704%22%2C%22timestamp%22%3A1700343429140%7D
[NAVIGATED] http://128.138.93.172/continuous-testing/aqua/html/sim-test.html?url=..%2F..%2Fct-snapshots%2F1700341783704%2Fhookes-law%2Fhookes-law_en.html&simQueryParameters=brand%3Dphet%26ea%26fuzz%26listenerOrder%3Drandom&testInfo=%7B%22test%22%3A%5B%22hookes-law%22%2C%22fuzz%22%2C%22unbuilt%22%2C%22listenerOrderRandom%22%5D%2C%22snapshotName%22%3A%22snapshot-1700341783704%22%2C%22timestamp%22%3A1700343429140%7D
[NAVIGATED] about:blank
[NAVIGATED] http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/hookes-law/hookes-law_en.html?continuousTest=%7B%22test%22%3A%5B%22hookes-law%22%2C%22fuzz%22%2C%22unbuilt%22%2C%22listenerOrderRandom%22%5D%2C%22snapshotName%22%3A%22snapshot-1700341783704%22%2C%22timestamp%22%3A1700343429140%7D&brand=phet&ea&fuzz&listenerOrder=random
[CONSOLE] enabling assert
[CONSOLE] listenerOrder random seed: 176881
[CONSOLE] continuous-test-load
[CONSOLE] Assertion failed: right must be > left, right=0.5, left=0.75
[PAGE ERROR] Error: Error: Assertion failed: right must be > left, right=0.5, left=0.75
at window.assertions.assertFunction (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/assert/js/assert.js:28:13)
at http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/hookes-law/js/common/model/Spring.js:187:17
at getDerivedValue (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/DerivedProperty.js:30:12)
at DerivedProperty.getDerivedPropertyListener (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/DerivedProperty.js:119:17)
at TinyProperty.emit (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/TinyEmitter.js:96:9)
at NumberProperty._notifyListeners (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/ReadOnlyProperty.js:250:23)
at NumberProperty.unguardedSet (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/ReadOnlyProperty.js:199:14)
at NumberProperty.set (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/ReadOnlyProperty.js:184:12)
at set value [as value] (http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/axon/js/Property.js:48:11)
at http://128.138.93.172/continuous-testing/ct-snapshots/1700341783704/chipper/dist/js/hookes-law/js/systems/model/SeriesSystem.js:113:43
[CONSOLE] continuous-test-error

id: "Sparky Node Puppeteer"
Snapshot from 11/18/2023, 2:09:43 PM
pixelzoom commented 8 months ago

The failure occurs with listenerOrder=random(176881) in Spring rightProperty:

this.rightProperty = new DerivedProperty(
      [ this.leftProperty, this.equilibriumXProperty, this.displacementProperty ],

I thought I could add hasListenerOrderDependencies: true, but that resulted in no change, still failing.

pixelzoom commented 8 months ago

The above commit seems to address the problem. I'll leave this open for a few CT cycles to confirm.

pixelzoom commented 8 months ago

CT looks good. Closing.