# HG changeset patch # User psandoz # Date 1380790791 -7200 # Node ID 0c41e68de505b811615bbae9164a9e7b9cb32762 # Parent 8498104f92c3b1296756d0027873dcf7a7a855a8 8025567: Mark relevant public stream tests as serialization hostile Reviewed-by: alanb diff -r 8498104f92c3 -r 0c41e68de505 jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java Wed Oct 02 16:34:12 2013 +0200 +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ForEachOpTest.java Thu Oct 03 10:59:51 2013 +0200 @@ -69,7 +69,7 @@ }; } - @Test + @Test(groups = { "serialization-hostile" }) public void testForEachOrdered() { List input = countTo(10000); TestData.OfRef data = TestData.Factory.ofCollection("[1, 10000]", input); @@ -116,7 +116,7 @@ // - @Test + @Test(groups = { "serialization-hostile" }) public void testIntForEachOrdered() { List input = countTo(10000); TestData.OfInt data = TestData.Factory.ofIntSupplier("[1, 10000]", @@ -164,7 +164,7 @@ // - @Test + @Test(groups = { "serialization-hostile" }) public void testLongForEachOrdered() { List input = countTo(10000); TestData.OfLong data = TestData.Factory.ofLongSupplier("[1, 10000]", @@ -212,7 +212,7 @@ // - @Test + @Test(groups = { "serialization-hostile" }) public void testDoubleForEachOrdered() { List input = countTo(10000); TestData.OfDouble data = TestData.Factory.ofDoubleSupplier("[1, 10000]", diff -r 8498104f92c3 -r 0c41e68de505 jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java Wed Oct 02 16:34:12 2013 +0200 +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java Thu Oct 03 10:59:51 2013 +0200 @@ -147,7 +147,8 @@ return Math.max(0, dataSize - skip); } - @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class) + @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class, + groups = { "serialization-hostile" }) public void testSkipOps(String name, TestData.OfRef data) { List skips = sizes(data.size()); @@ -169,7 +170,8 @@ } } - @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class) + @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class, + groups = { "serialization-hostile" }) public void testSkipLimitOps(String name, TestData.OfRef data) { List skips = sizes(data.size()); List limits = skips; @@ -242,7 +244,8 @@ testSkipLimitOps("testSkipLimitOpsWithNonSplittingSpliterator", data); } - @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class) + @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class, + groups = { "serialization-hostile" }) public void testLimitOps(String name, TestData.OfRef data) { List limits = sizes(data.size()); diff -r 8498104f92c3 -r 0c41e68de505 jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java Wed Oct 02 16:34:12 2013 +0200 +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamBuilderTest.java Thu Oct 03 10:59:51 2013 +0200 @@ -97,7 +97,7 @@ checkISE(() -> sb.build()); } - @Test(dataProvider = "sizes") + @Test(dataProvider = "sizes", groups = { "serialization-hostile" }) public void testStreamBuilder(int size) { testStreamBuilder(size, (s) -> { Stream.Builder sb = Stream.builder(); @@ -159,7 +159,7 @@ checkISE(() -> sb.build()); } - @Test(dataProvider = "sizes") + @Test(dataProvider = "sizes", groups = { "serialization-hostile" }) public void testIntStreamBuilder(int size) { testIntStreamBuilder(size, (s) -> { IntStream.Builder sb = IntStream.builder(); @@ -221,7 +221,7 @@ checkISE(() -> sb.build()); } - @Test(dataProvider = "sizes") + @Test(dataProvider = "sizes", groups = { "serialization-hostile" }) public void testLongStreamBuilder(int size) { testLongStreamBuilder(size, (s) -> { LongStream.Builder sb = LongStream.builder(); @@ -282,7 +282,7 @@ checkISE(() -> sb.build()); } - @Test(dataProvider = "sizes") + @Test(dataProvider = "sizes", groups = { "serialization-hostile" }) public void testDoubleStreamBuilder(int size) { testDoubleStreamBuilder(size, (s) -> { DoubleStream.Builder sb = DoubleStream.builder(); diff -r 8498104f92c3 -r 0c41e68de505 jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java Wed Oct 02 16:34:12 2013 +0200 +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ToArrayOpTest.java Thu Oct 03 10:59:51 2013 +0200 @@ -165,7 +165,8 @@ }; } - @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class) + @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class, + groups = { "serialization-hostile" }) public void testStatefulOpPermutations(String name, TestData.OfRef data) { for (Function, Stream> f : statefulOpPermutations) { withData(data).terminal(f, s -> s.toArray())