-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: 8.2.0-rc0, 8.3.0-rc0
-
Component/s: None
-
None
-
Replication
-
Fully Compatible
-
ALL
-
Correctness 2025-08-11
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Some of the jstests passthrough suites define a custom test runner, for example magic_restore_sharding_jscore_passthrough. Those test runner assume that they can wrap the entire execution of a jstest, for example to handle errors specially, or run code after the test has finished.
The new Mochalite tests run using a special hook in the shell, which is invoked after the jstest file has been executed. Thus, they run outside the test runner, so they bypass the custom behaviors that the test suite may want to impose.
For example, running this test code in magic_restore_sharding_jscore_passthrough:
assert.commandWorked(db.adminCommand({doesNotExist: 1}));
Succeeds, because that suite has a test runner that swallows assertion errors.
However, running this test code, also in magic_restore_sharding_jscore_passthrough:
import {describe, it} from "jstests/libs/mochalite.js"; describe('Foo', function() { it('Bar', function() { assert.commandWorked(db.adminCommand({doesNotExist: 1})); }); });
Fails, because the assertion runs later, outside of the test runner.
- is depended on by
-
SERVER-108600 Re-enable magic restore passthroughs after mochalite compatibility fix
-
- Closed
-
- related to
-
SERVER-108599 Temporarily disable magic restore passthroughs due to mochalite incompatibility
-
- Closed
-
-
SERVER-108855 Complete TODO listed in SERVER-108224
-
- Closed
-
-
SERVER-108907 Complete TODO listed in SERVER-108224
-
- Closed
-
-
SERVER-108920 Complete TODO listed in SERVER-108224
-
- Closed
-