phetsims / gas-properties

"Gas Properties" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 6 forks source link

CT: numberOfSamples should be 1 if called while the sim is paused #238

Closed pixelzoom closed 1 month ago

pixelzoom commented 1 month ago

In gas-properties only, because it's a problem in the Energy screen:

gas-properties : phet-io-state-fuzz : unbuilt
http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/phet-io-wrappers/state/?sim=gas-properties&locales=*&phetioWrapperDebug=true&fuzz&phetioDebug=true&wrapperContinuousTest=%7B%22test%22%3A%5B%22gas-properties%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1715211083025%22%2C%22timestamp%22%3A1715217422080%7D
Assertion failed: numberOfSamples should be 1 if called while the sim is paused
Error: Assertion failed: numberOfSamples should be 1 if called while the sim is paused
at window.assertions.assertFunction (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/assert/js/assert.js:28:13)
at assert (HistogramsModel.ts:286:14)
at update (HistogramsModel.ts:260:11)
at step (HistogramsModel.ts:214:13)
at listener (TinyEmitter.ts:213:6)
at notifyLoop (TinyEmitter.ts:185:17)
at emit (ReadOnlyProperty.ts:352:22)
at _notifyListeners (ReadOnlyProperty.ts:296:13)
at unguardedSet (ReadOnlyProperty.ts:276:11)
at set (DerivedProperty.ts:179:12)
[URL] http://128.138.93.172/continuous-testing/aqua/html/wrapper-test.html?url=..%2F..%2Fct-snapshots%2F1715211083025%2Fphet-io-wrappers%2Fstate%2F%3Fsim%3Dgas-properties%26locales%3D*%26phetioWrapperDebug%3Dtrue%26fuzz%26phetioDebug%3Dtrue&testInfo=%7B%22test%22%3A%5B%22gas-properties%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1715211083025%22%2C%22timestamp%22%3A1715217422080%7D
[NAVIGATED] http://128.138.93.172/continuous-testing/aqua/html/wrapper-test.html?url=..%2F..%2Fct-snapshots%2F1715211083025%2Fphet-io-wrappers%2Fstate%2F%3Fsim%3Dgas-properties%26locales%3D*%26phetioWrapperDebug%3Dtrue%26fuzz%26phetioDebug%3Dtrue&testInfo=%7B%22test%22%3A%5B%22gas-properties%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1715211083025%22%2C%22timestamp%22%3A1715217422080%7D
[ATTACHED]
[NAVIGATED] about:blank
[NAVIGATED] http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/phet-io-wrappers/state/?sim=gas-properties&locales=*&phetioWrapperDebug=true&fuzz&phetioDebug=true&wrapperContinuousTest=%7B%22test%22%3A%5B%22gas-properties%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1715211083025%22%2C%22timestamp%22%3A1715217422080%7D
[ATTACHED]
[NAVIGATED] about:blank
[ATTACHED]
[NAVIGATED] about:blank
[CONSOLE] enabling assert
[NAVIGATED] http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/gas-properties/gas-properties_en.html?brand=phet-io&ea&postMessageOnError&sim=gas-properties&locales=*&phetioWrapperDebug=true&fuzz&phetioDebug=true&wrapperContinuousTest=%7B%22test%22%3A%5B%22gas-properties%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1715211083025%22%2C%22timestamp%22%3A1715217422080%7D&frameTitle=source
[NAVIGATED] http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/gas-properties/gas-properties_en.html?brand=phet-io&ea&postMessageOnError&sim=gas-properties&locales=*&phetioWrapperDebug=true&fuzz&phetioDebug=true&wrapperContinuousTest=%7B%22test%22%3A%5B%22gas-properties%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1715211083025%22%2C%22timestamp%22%3A1715217422080%7D&frameTitle=destination
[CONSOLE] enabling assert
[CONSOLE] enabling assert
[CONSOLE] continuous-test-wrapper-load
[CONSOLE] continuous-test-wrapper-load
[CONSOLE] Assertion failed: numberOfSamples should be 1 if called while the sim is paused
[PAGE ERROR] Error: Error: Assertion failed: numberOfSamples should be 1 if called while the sim is paused
at window.assertions.assertFunction (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/assert/js/assert.js:28:13)
at HistogramsModel.update (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/gas-properties/js/energy/model/HistogramsModel.js:248:15)
at HistogramsModel.step (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/gas-properties/js/energy/model/HistogramsModel.js:224:12)
at http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/gas-properties/js/energy/model/HistogramsModel.js:181:14
at TinyProperty.notifyLoop (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/axon/js/TinyEmitter.js:176:7)
at TinyProperty.emit (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/axon/js/TinyEmitter.js:154:18)
at DerivedProperty._notifyListeners (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/axon/js/ReadOnlyProperty.js:264:23)
at DerivedProperty.unguardedSet (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/axon/js/ReadOnlyProperty.js:211:14)
at DerivedProperty.set (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/axon/js/ReadOnlyProperty.js:193:12)
at DerivedProperty.getDerivedPropertyListener (http://128.138.93.172/continuous-testing/ct-snapshots/1715211083025/chipper/dist/js/axon/js/DerivedProperty.js:121:13)
[CONSOLE] continuous-test-wrapper-error
[CONSOLE] continuous-test-wrapper-error

id: "Bayes Node Puppeteer"
Snapshot from 5/8/2024, 5:31:23 PM
pixelzoom commented 1 month ago

In https://github.com/phetsims/gas-properties/commit/0590812ce9f776d24bf484da0e7cc99f93db31bd, I added a test for isSettingPhetioStateProperty that should fix this. I'll leave this open for a bit to see if CT agrees.

pixelzoom commented 1 month ago

CT is happy, closing.