fix(ci): ignore stale Surefire reports
This commit is contained in:
@@ -17,10 +17,17 @@ test('coordinator releases its builder while waiting for downstream jobs', () =>
|
||||
test('coordinator runs selected tests once before parallel service packaging', () => {
|
||||
const gateIndex = pipeline.indexOf("stage('统一 Maven 测试门禁')")
|
||||
const dispatchIndex = pipeline.indexOf("stage('并行调度独立服务 Job')")
|
||||
const staleReportCleanupIndex = pipeline.indexOf(
|
||||
"find . -type f -path '*/target/surefire-reports/TEST-*.xml' -delete"
|
||||
)
|
||||
const selectedTestIndex = pipeline.indexOf('-pl ${selectedModules} -am test')
|
||||
|
||||
assert.ok(gateIndex >= 0, 'unified test gate must exist')
|
||||
assert.ok(dispatchIndex > gateIndex, 'unified tests must finish before downstream dispatch')
|
||||
assert.ok(staleReportCleanupIndex > gateIndex, 'stale Surefire reports must be removed inside the test gate')
|
||||
assert.ok(selectedTestIndex > staleReportCleanupIndex, 'stale reports must be removed before selected tests run')
|
||||
assert.match(pipeline, /-pl \$\{selectedModules\} -am test/)
|
||||
assert.match(pipeline, /junit allowEmptyResults: true, testResults: '\*\*\/target\/surefire-reports\/TEST-\*\.xml'/)
|
||||
assert.match(pipeline, /booleanParam\(name: 'SKIP_TESTS', value: true\)/)
|
||||
assert.doesNotMatch(pipeline, /TESTED_COMMIT/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user