Skip to content

Commit 84a8f53

Browse files
committed
feat(integ-runner): add TEST_WARNING diagnostic for long-running tests
1 parent 672ee1c commit 84a8f53

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/@aws-cdk/integ-runner/lib/workers/common.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ export enum DiagnosticReason {
191191
*/
192192
TEST_ERROR = 'TEST_ERROR',
193193

194+
/**
195+
* A non-failing warning from the integration test run
196+
*/
197+
TEST_WARNING = 'TEST_WARNING',
198+
194199
/**
195200
* The snapshot test failed because the actual
196201
* snapshot was different than the expected snapshot
@@ -294,6 +299,9 @@ export function printResults(diagnostic: Diagnostic): void {
294299
case DiagnosticReason.SNAPSHOT_FAILED:
295300
logger.error(' CHANGED %s %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
296301
break;
302+
case DiagnosticReason.TEST_WARNING:
303+
logger.warning(' WARN %s %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
304+
break;
297305
case DiagnosticReason.SNAPSHOT_ERROR:
298306
case DiagnosticReason.TEST_ERROR:
299307
logger.error(' ERROR %s %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));

packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function snapshotTestWorker(testInfo: IntegTestInfo, options: Snaps
132132

133133
const timer = setTimeout(() => {
134134
workerpool.workerEmit({
135-
reason: DiagnosticReason.SNAPSHOT_ERROR,
135+
reason: DiagnosticReason.TEST_WARNING,
136136
testName: test.testName,
137137
message: 'Test is taking a very long time',
138138
duration: (Date.now() - start) / 1000,

0 commit comments

Comments
 (0)