Revert "fix error count lies and clean up tests a bit"

This reverts commit 3e2c26d7d5.
This commit is contained in:
Greta Parks
2023-05-12 15:53:50 +00:00
parent dcb366ca66
commit c02d64fe5c
5 changed files with 111 additions and 86 deletions

22
dist/index.js generated vendored
View File

@@ -10143,6 +10143,16 @@ 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))
@@ -10191,7 +10201,7 @@ class Deployment {
}
}
if (errorCount > maxErrorCount) {
if (errorCount >= maxErrorCount) {
core.error('Too many errors, aborting!')
core.setFailed('Failed with status code: ' + errorStatus)
@@ -10199,16 +10209,6 @@ 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
}
}
}