Skip to content

Commit 6cba723

Browse files
committed
Revert changes to test for flakiness
1 parent 635e628 commit 6cba723

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

lib/command/run-rerun.js

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ module.exports = async function (test, options) {
1717
const testRoot = getTestRoot(configFile)
1818
createOutputDir(config, testRoot)
1919

20+
function processError(err) {
21+
printError(err)
22+
process.exit(1)
23+
}
2024
const codecept = new Codecept(config, options)
2125

2226
try {

lib/rerun.js

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class CodeceptRerunner extends BaseCodecept {
7070
await this.runTests(test);
7171
} catch (e) {
7272
output.error(e.stack);
73-
throw e;
7473
} finally {
7574
event.emit(event.all.result, this);
7675
event.emit(event.all.after, this);

test/runner/run_rerun_test.js

-14
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,4 @@ describe('run-rerun command', () => {
9696
},
9797
)
9898
})
99-
100-
it('should throw exit code 1 if all tests were supposed to pass', (done) => {
101-
exec(
102-
`FAIL_ATTEMPT=0 ${codecept_run_config('codecept.conf.pass_all_test.js', '@RunRerun - fail second test')} --debug`,
103-
(err, stdout) => {
104-
expect(stdout).toContain('Process run 1 of max 3, success runs 1/3')
105-
expect(stdout).toContain('Fail run 2 of max 3, success runs 1/3')
106-
expect(stdout).toContain('Process run 3 of max 3, success runs 2/3')
107-
expect(stdout).toContain('Flaky tests detected!')
108-
expect(err.code).toBe(1)
109-
done()
110-
},
111-
)
112-
})
11399
})

0 commit comments

Comments
 (0)