changeset 7810:f262ed449eb4

Mark tests as serialization hostile.
author psandoz
date Thu, 04 Apr 2013 11:38:48 +0200
parents 8c1a7e894916
children e74b9d1d2785
files test-ng/tests/org/openjdk/tests/java/util/stream/IntPrimitiveOpsTests.java test-ng/tests/org/openjdk/tests/java/util/stream/LongPrimitiveOpsTests.java test-ng/tests/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java
diffstat 3 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test-ng/tests/org/openjdk/tests/java/util/stream/IntPrimitiveOpsTests.java	Thu Apr 04 11:23:51 2013 +0200
+++ b/test-ng/tests/org/openjdk/tests/java/util/stream/IntPrimitiveOpsTests.java	Thu Apr 04 11:38:48 2013 +0200
@@ -55,18 +55,21 @@
         assertEquals(sum, 20);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testTee() {
         int[] teeSum = new int[1];
         long sum = Streams.intRange(1, 10).filter(i -> i % 2 == 0).peek(i -> { teeSum[0] = teeSum[0] + i; }).sum();
         assertEquals(teeSum[0], sum);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testForEach() {
         int[] sum = new int[1];
         Streams.intRange(1, 10).filter(i -> i % 2 == 0).forEach(i -> { sum[0] = sum[0] + i; });
         assertEquals(sum[0], 20);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testParForEach() {
         AtomicInteger ai = new AtomicInteger(0);
         Streams.intRange(1, 10).parallel().filter(i -> i % 2 == 0).forEach(ai::addAndGet);
--- a/test-ng/tests/org/openjdk/tests/java/util/stream/LongPrimitiveOpsTests.java	Thu Apr 04 11:23:51 2013 +0200
+++ b/test-ng/tests/org/openjdk/tests/java/util/stream/LongPrimitiveOpsTests.java	Thu Apr 04 11:38:48 2013 +0200
@@ -55,18 +55,21 @@
         assertEquals(sum, 20);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testTee() {
         long[] teeSum = new long[1];
         long sum = Streams.longRange(1, 10).filter(i -> i % 2 == 0).peek(i -> { teeSum[0] = teeSum[0] + i; }).sum();
         assertEquals(teeSum[0], sum);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testForEach() {
         long[] sum = new long[1];
         Streams.longRange(1, 10).filter(i -> i % 2 == 0).forEach(i -> { sum[0] = sum[0] + i; });
         assertEquals(sum[0], 20);
     }
 
+    @Test(groups = { "serialization-hostile" })
     public void testParForEach() {
         AtomicLong ai = new AtomicLong(0);
         Streams.longRange(1, 10).parallel().filter(i -> i % 2 == 0).forEach(ai::addAndGet);
--- a/test-ng/tests/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java	Thu Apr 04 11:23:51 2013 +0200
+++ b/test-ng/tests/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java	Thu Apr 04 11:38:48 2013 +0200
@@ -273,7 +273,9 @@
         }
     }
 
-    @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+    @Test(dataProvider = "StreamTestData<Integer>",
+          dataProviderClass = StreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testStreamSpliterators(String name, StreamTestData<Integer> data) {
         for (Function<Stream<Integer>, Stream<Integer>> f : streamFunctions()) {
             withData(data).
@@ -362,7 +364,9 @@
         }
     }
 
-    @Test(dataProvider = "IntStreamTestData", dataProviderClass = IntStreamTestDataProvider.class)
+    @Test(dataProvider = "IntStreamTestData",
+          dataProviderClass = IntStreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testIntStreamSpliterators(String name, IntStreamTestData data) {
         for (Function<IntStream, IntStream> f : intStreamFunctions()) {
             withData(data).
@@ -446,7 +450,9 @@
         }
     }
 
-    @Test(dataProvider = "LongStreamTestData", dataProviderClass = LongStreamTestDataProvider.class)
+    @Test(dataProvider = "LongStreamTestData",
+          dataProviderClass = LongStreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testLongStreamSpliterators(String name, LongStreamTestData data) {
         for (Function<LongStream, LongStream> f : longStreamFunctions()) {
             withData(data).
@@ -530,7 +536,9 @@
         }
     }
 
-    @Test(dataProvider = "DoubleStreamTestData", dataProviderClass = DoubleStreamTestDataProvider.class)
+    @Test(dataProvider = "DoubleStreamTestData",
+          dataProviderClass = DoubleStreamTestDataProvider.class,
+          groups = { "serialization-hostile" })
     public void testDoubleStreamSpliterators(String name, DoubleStreamTestData data) {
         for (Function<DoubleStream, DoubleStream> f : doubleStreamFunctions()) {
             withData(data).