Skip to content

Commit

Permalink
Test flake seen on CI.
Browse files Browse the repository at this point in the history
Probably due to: https://issues.jenkins-ci.org/browse/JENKINS-46076?focusedCommentId=368388&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-368388
java.lang.AssertionError:

Expected: a string containing "Labels must follow required specs - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set: mypod!123"
     but: was "Started
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] podTemplate
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
"
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.junit.Assert.assertThat(Assert.java:956)
	at org.junit.Assert.assertThat(Assert.java:923)
	at org.jvnet.hudson.test.JenkinsRule.assertLogContains(JenkinsRule.java:1308)
	at org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecutionTest.testBadLabel(PodTemplateStepExecutionTest.java:85)
  • Loading branch information
jglick committed Jun 5, 2019
1 parent 3eb8feb commit 575a8f8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testBadNameDetection() throws Exception {
WorkflowRun b = p.scheduleBuild2(0).waitForStart();
assertNotNull(b);
r.assertBuildStatus(Result.FAILURE, r.waitForCompletion(b));
r.assertLogContains(Messages.RFC1123_error("badcontainerName_!"), b);
r.waitForMessage(Messages.RFC1123_error("badcontainerName_!"), b);
}

@Test
Expand All @@ -72,7 +72,7 @@ public void testBadNameYamlDetection() throws Exception {
WorkflowRun b = p.scheduleBuild2(0).waitForStart();
assertNotNull(b);
r.assertBuildStatus(Result.FAILURE, r.waitForCompletion(b));
r.assertLogContains(Messages.RFC1123_error("badcontainername_!, badcontainername2_!"), b);
r.waitForMessage(Messages.RFC1123_error("badcontainername_!, badcontainername2_!"), b);
}

@Test
Expand All @@ -82,7 +82,7 @@ public void testBadLabel() throws Exception {
WorkflowRun b = p.scheduleBuild2(0).waitForStart();
assertNotNull(b);
r.assertBuildStatus(Result.FAILURE, r.waitForCompletion(b));
r.assertLogContains(Messages.label_error("mypod!123"), b);
r.waitForMessage(Messages.label_error("mypod!123"), b);
}

}

0 comments on commit 575a8f8

Please sign in to comment.