Skip to content

Commit

Permalink
add review notes (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
MxEh-TT committed Jul 30, 2024
1 parent 8af4805 commit f21d475
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import org.kohsuke.stapler.DataBoundSetter
import java.text.SimpleDateFormat

class ProvideLogsStep extends Step {
public static final int DEFAULT_TIMEOUT = 0
public static final int DEFAULT_TIMEOUT = 36000
private int timeout

ProvideLogsStep() {
Expand Down Expand Up @@ -113,9 +113,13 @@ class ProvideLogsStep extends Step {
workspace.child(logDirName).deleteContents()
listener.logger.println("Successfully added ecu.test logs to jenkins.")
} catch (Exception e) {
if (e instanceof AbortException) {
run.setResult(Result.UNSTABLE)
} else {
run.setResult(Result.FAILURE)
}
listener.logger.println('Providing ecu.test logs failed!')
listener.error(e.message)
run.setResult(Result.FAILURE)
}
listener.logger.flush()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ETV1ContainerTest extends ETContainerTest {
WorkflowJob job = jenkins.createProject(WorkflowJob.class, "pipeline")
job.setDefinition(new CpsFlowDefinition(script, true))
when: "scheduling a new build"
WorkflowRun run = jenkins.buildAndAssertStatus(Result.FAILURE, job)
WorkflowRun run = jenkins.buildAndAssertStatus(Result.UNSTABLE, job)

then: "expect successful test completion"
jenkins.assertLogContains("Providing ecu.test logs to jenkins.", run)
Expand Down

0 comments on commit f21d475

Please sign in to comment.