fix error count lies and clean up tests a bit

This commit is contained in:
Greta Parks
2023-05-11 20:38:18 +00:00
parent 054faf7e6d
commit 3e2c26d7d5
5 changed files with 86 additions and 111 deletions

22
dist/index.js generated vendored
View File

@@ -10143,16 +10143,6 @@ class Deployment {
/*eslint no-constant-condition: ["error", { "checkLoops": false }]*/
while (true) {
// Handle timeout
if (Date.now() - this.startTime >= this.timeout) {
core.error('Timeout reached, aborting!')
core.setFailed('Timeout reached, aborting!')
// Explicitly cancel the deployment
await this.cancel()
return
}
// Handle reporting interval
await new Promise(resolve => setTimeout(resolve, reportingInterval + errorReportingInterval))
@@ -10201,7 +10191,7 @@ class Deployment {
}
}
if (errorCount >= maxErrorCount) {
if (errorCount > maxErrorCount) {
core.error('Too many errors, aborting!')
core.setFailed('Failed with status code: ' + errorStatus)
@@ -10209,6 +10199,16 @@ class Deployment {
await this.cancel()
return
}
// Handle timeout
if (Date.now() - this.startTime >= this.timeout) {
core.error('Timeout reached, aborting!')
core.setFailed('Timeout reached, aborting!')
// Explicitly cancel the deployment
await this.cancel()
return
}
}
}

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long