locking test improvements
parent
19cd7ddf84
commit
a7787b43cd
|
@ -72,10 +72,15 @@ class AWSTaskRunner {
|
||||||
|
|
||||||
CloudRunnerLogger.log(`Streaming...`);
|
CloudRunnerLogger.log(`Streaming...`);
|
||||||
const { output, shouldCleanup } = await this.streamLogsUntilTaskStops(cluster, taskArn, streamName);
|
const { output, shouldCleanup } = await this.streamLogsUntilTaskStops(cluster, taskArn, streamName);
|
||||||
await new Promise((resolve) => resolve(10000));
|
let exitCode;
|
||||||
const taskData = await AWSTaskRunner.describeTasks(cluster, taskArn);
|
let containerState;
|
||||||
const containerState = taskData.containers?.[0];
|
let taskData;
|
||||||
const exitCode = containerState?.exitCode;
|
while (exitCode === undefined) {
|
||||||
|
await new Promise((resolve) => resolve(10000));
|
||||||
|
taskData = await AWSTaskRunner.describeTasks(cluster, taskArn);
|
||||||
|
containerState = taskData.containers?.[0];
|
||||||
|
exitCode = containerState?.exitCode;
|
||||||
|
}
|
||||||
CloudRunnerLogger.log(`Container State: ${JSON.stringify(containerState, undefined, 4)}`);
|
CloudRunnerLogger.log(`Container State: ${JSON.stringify(containerState, undefined, 4)}`);
|
||||||
if (exitCode === undefined) {
|
if (exitCode === undefined) {
|
||||||
CloudRunnerLogger.logWarning(`Undefined exitcode for container`);
|
CloudRunnerLogger.logWarning(`Undefined exitcode for container`);
|
||||||
|
|
Loading…
Reference in New Issue