Skip to content

Commit 3098961

Browse files
authored
Clearer assertion for QueueTest.inQueueTaskLookupByAPI (#10558)
2 parents 8f88a1d + 6f84265 commit 3098961

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/src/test/java/hudson/model/QueueTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import static org.hamcrest.Matchers.lessThan;
3535
import static org.hamcrest.Matchers.not;
3636
import static org.hamcrest.Matchers.nullValue;
37+
import static org.hamcrest.Matchers.oneOf;
3738
import static org.junit.Assert.assertEquals;
3839
import static org.junit.Assert.assertFalse;
3940
import static org.junit.Assert.assertNotEquals;
@@ -444,7 +445,7 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
444445
XmlPage queueItem = webclient.goToXml("queue/item/" + queueTaskId + "/api/xml");
445446
assertNotNull(queueItem);
446447
String tagName = queueItem.getDocumentElement().getTagName();
447-
assertTrue(tagName.equals("blockedItem") || tagName.equals("buildableItem"));
448+
assertThat(tagName, oneOf("blockedItem", "buildableItem"));
448449

449450
// Clear the queue
450451
assertTrue(r.jenkins.getQueue().cancel(p));

0 commit comments

Comments
 (0)