8131140: Mark some tests from WhileOpStatefulTest.java and WhileOpTest.java as serialization hostile
Reviewed-by: psandoz
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpStatefulTest.java Thu Jul 16 10:17:11 2015 +0200
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpStatefulTest.java Thu Jul 16 10:21:21 2015 +0200
@@ -87,7 +87,7 @@
});
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testCountTakeWithCount() {
testTakeWhileMulti(
s -> {
@@ -116,7 +116,7 @@
});
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testCountTakeWithToArray() {
testTakeWhileMulti(
s -> {
@@ -146,7 +146,7 @@
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testCountDropWithCount() {
testDropWhileMulti(
s -> {
@@ -179,7 +179,7 @@
});
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testCountDropWithToArray() {
testDropWhileMulti(
s -> {
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java Thu Jul 16 10:17:11 2015 +0200
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java Thu Jul 16 10:21:21 2015 +0200
@@ -51,7 +51,8 @@
@Test
public class WhileOpTest extends OpTestCase {
- @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+ @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+ groups = { "serialization-hostile" })
public void testTakeWhileOps(String name, TestData.OfRef<Integer> data) {
for (int size : sizes(data.size())) {
setContext("takeWhile", size);
@@ -73,7 +74,8 @@
}
}
- @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+ @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+ groups = { "serialization-hostile" })
public void testDropWhileOps(String name, TestData.OfRef<Integer> data) {
for (int size : sizes(data.size())) {
setContext("dropWhile", size);
@@ -94,7 +96,8 @@
}
}
- @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+ @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
+ groups = { "serialization-hostile" })
public void testDropTakeWhileOps(String name, TestData.OfRef<Integer> data) {
for (int size : sizes(data.size())) {
setContext("dropWhile", size);
@@ -319,7 +322,7 @@
}
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testRefDefaultClose() {
AtomicBoolean isClosed = new AtomicBoolean();
Stream<Integer> s = Stream.of(1, 2, 3).onClose(() -> isClosed.set(true));
@@ -329,7 +332,7 @@
assertTrue(isClosed.get());
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testIntDefaultClose() {
AtomicBoolean isClosed = new AtomicBoolean();
IntStream s = IntStream.of(1, 2, 3).onClose(() -> isClosed.set(true));
@@ -339,7 +342,7 @@
assertTrue(isClosed.get());
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testLongDefaultClose() {
AtomicBoolean isClosed = new AtomicBoolean();
LongStream s = LongStream.of(1, 2, 3).onClose(() -> isClosed.set(true));
@@ -349,7 +352,7 @@
assertTrue(isClosed.get());
}
- @Test
+ @Test(groups = { "serialization-hostile" })
public void testDoubleDefaultClose() {
AtomicBoolean isClosed = new AtomicBoolean();
DoubleStream s = DoubleStream.of(1, 2, 3).onClose(() -> isClosed.set(true));