Skip to content

Commit 9682314

Browse files
author
Amos Shi
committed
8318809: java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java shows intermittent failures on linux ppc64le and aarch64
Backport-of: 50d1839d54f13631946925d8ecf03ce71f31bab8
1 parent 71630eb commit 9682314

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

test/jdk/java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java

-30
Original file line numberDiff line numberDiff line change
@@ -281,36 +281,6 @@ public void pollActionsOneNodeSlack(
281281
assertInvariants(q);
282282
}
283283

284-
/**
285-
* Actions that append an element, and are expected to
286-
* leave at most one slack node at tail.
287-
*/
288-
@DataProvider
289-
public Object[][] addActions() {
290-
return List.<Consumer<ConcurrentLinkedQueue>>of(
291-
q -> q.add(1),
292-
q -> q.offer(1))
293-
.stream().map(x -> new Object[]{ x }).toArray(Object[][]::new);
294-
}
295-
296-
@Test(dataProvider = "addActions")
297-
public void addActionsOneNodeSlack(
298-
Consumer<ConcurrentLinkedQueue> addAction) {
299-
ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
300-
int n = 1 + rnd.nextInt(5);
301-
for (int i = 0; i < n; i++) {
302-
boolean slack = next(tail(q)) != null;
303-
addAction.accept(q);
304-
if (slack)
305-
assertNull(next(tail(q)));
306-
else {
307-
assertNotNull(next(tail(q)));
308-
assertNull(next(next(tail(q))));
309-
}
310-
assertInvariants(q);
311-
}
312-
}
313-
314284
byte[] serialBytes(Object o) {
315285
try {
316286
ByteArrayOutputStream bos = new ByteArrayOutputStream();

0 commit comments

Comments
 (0)