mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-13 16:38:50 +00:00
8025567: Mark relevant public stream tests as serialization hostile
Reviewed-by: alanb
This commit is contained in:
parent
10a6fcc8a0
commit
1604846c44
@ -69,7 +69,7 @@ public class ForEachOpTest extends OpTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(groups = { "serialization-hostile" })
|
||||
public void testForEachOrdered() {
|
||||
List<Integer> input = countTo(10000);
|
||||
TestData.OfRef<Integer> data = TestData.Factory.ofCollection("[1, 10000]", input);
|
||||
@ -116,7 +116,7 @@ public class ForEachOpTest extends OpTestCase {
|
||||
|
||||
//
|
||||
|
||||
@Test
|
||||
@Test(groups = { "serialization-hostile" })
|
||||
public void testIntForEachOrdered() {
|
||||
List<Integer> input = countTo(10000);
|
||||
TestData.OfInt data = TestData.Factory.ofIntSupplier("[1, 10000]",
|
||||
@ -164,7 +164,7 @@ public class ForEachOpTest extends OpTestCase {
|
||||
|
||||
//
|
||||
|
||||
@Test
|
||||
@Test(groups = { "serialization-hostile" })
|
||||
public void testLongForEachOrdered() {
|
||||
List<Integer> input = countTo(10000);
|
||||
TestData.OfLong data = TestData.Factory.ofLongSupplier("[1, 10000]",
|
||||
@ -212,7 +212,7 @@ public class ForEachOpTest extends OpTestCase {
|
||||
|
||||
//
|
||||
|
||||
@Test
|
||||
@Test(groups = { "serialization-hostile" })
|
||||
public void testDoubleForEachOrdered() {
|
||||
List<Integer> input = countTo(10000);
|
||||
TestData.OfDouble data = TestData.Factory.ofDoubleSupplier("[1, 10000]",
|
||||
|
||||
@ -147,7 +147,8 @@ public class SliceOpTest extends OpTestCase {
|
||||
return Math.max(0, dataSize - skip);
|
||||
}
|
||||
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
|
||||
groups = { "serialization-hostile" })
|
||||
public void testSkipOps(String name, TestData.OfRef<Integer> data) {
|
||||
List<Integer> skips = sizes(data.size());
|
||||
|
||||
@ -169,7 +170,8 @@ public class SliceOpTest extends OpTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
|
||||
groups = { "serialization-hostile" })
|
||||
public void testSkipLimitOps(String name, TestData.OfRef<Integer> data) {
|
||||
List<Integer> skips = sizes(data.size());
|
||||
List<Integer> limits = skips;
|
||||
@ -242,7 +244,8 @@ public class SliceOpTest extends OpTestCase {
|
||||
testSkipLimitOps("testSkipLimitOpsWithNonSplittingSpliterator", data);
|
||||
}
|
||||
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
|
||||
groups = { "serialization-hostile" })
|
||||
public void testLimitOps(String name, TestData.OfRef<Integer> data) {
|
||||
List<Integer> limits = sizes(data.size());
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ public class StreamBuilderTest extends OpTestCase {
|
||||
checkISE(() -> sb.build());
|
||||
}
|
||||
|
||||
@Test(dataProvider = "sizes")
|
||||
@Test(dataProvider = "sizes", groups = { "serialization-hostile" })
|
||||
public void testStreamBuilder(int size) {
|
||||
testStreamBuilder(size, (s) -> {
|
||||
Stream.Builder<Integer> sb = Stream.builder();
|
||||
@ -159,7 +159,7 @@ public class StreamBuilderTest extends OpTestCase {
|
||||
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 @@ public class StreamBuilderTest extends OpTestCase {
|
||||
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 @@ public class StreamBuilderTest extends OpTestCase {
|
||||
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();
|
||||
|
||||
@ -165,7 +165,8 @@ public class ToArrayOpTest extends OpTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
|
||||
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class,
|
||||
groups = { "serialization-hostile" })
|
||||
public void testStatefulOpPermutations(String name, TestData.OfRef<Integer> data) {
|
||||
for (Function<Stream<Integer>, Stream<Integer>> f : statefulOpPermutations) {
|
||||
withData(data).terminal(f, s -> s.toArray())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user