From 61044a00d5fe556382778f01d7113f0395a12a96 Mon Sep 17 00:00:00 2001 From: janakr Date: Tue, 19 Jun 2018 12:08:55 -0700 Subject: Delete switch for nested set serialization. It's fast enough to be on by default. PiperOrigin-RevId: 201218341 --- .../lib/collect/nestedset/NestedSetCodecTest.java | 23 +++++----------------- 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib') diff --git a/src/test/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecTest.java b/src/test/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecTest.java index 2ff9206a08..ecf58efac8 100644 --- a/src/test/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecTest.java +++ b/src/test/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecTest.java @@ -27,7 +27,6 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSetStore.NestedSetS import com.google.devtools.build.lib.skyframe.serialization.AutoRegistry; import com.google.devtools.build.lib.skyframe.serialization.DeserializationContext; import com.google.devtools.build.lib.skyframe.serialization.ObjectCodecs; -import com.google.devtools.build.lib.skyframe.serialization.SerializationConstants; import com.google.devtools.build.lib.skyframe.serialization.SerializationContext; import com.google.devtools.build.lib.skyframe.serialization.SerializationException; import com.google.devtools.build.lib.skyframe.serialization.SerializationResult; @@ -36,8 +35,6 @@ import java.io.IOException; import java.nio.charset.Charset; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import org.junit.After; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -47,16 +44,6 @@ import org.mockito.Mockito; /** Tests for {@link NestedSet} serialization. */ @RunWith(JUnit4.class) public class NestedSetCodecTest { - @Before - public void setUp() { - SerializationConstants.shouldSerializeNestedSet = true; - } - - @After - public void tearDown() { - SerializationConstants.shouldSerializeNestedSet = false; - } - @Test public void testAutoCodecedCodec() throws Exception { ObjectCodecs objectCodecs = @@ -72,7 +59,7 @@ public class NestedSetCodecTest { AutoRegistry.get() .getBuilder() .setAllowDefaultCodec(true) - .add(new NestedSetCodecWithStore<>(NestedSetStore.inMemory())) + .add(new NestedSetCodecWithStore(NestedSetStore.inMemory())) .build(), ImmutableMap.of()); NestedSetCodecTestUtils.checkCodec(objectCodecs, true, true); @@ -100,7 +87,7 @@ public class NestedSetCodecTest { AutoRegistry.get() .getBuilder() .setAllowDefaultCodec(true) - .add(new NestedSetCodecWithStore<>(nestedSetStore)) + .add(new NestedSetCodecWithStore(nestedSetStore)) .build(), ImmutableMap.of()); @@ -138,7 +125,7 @@ public class NestedSetCodecTest { AutoRegistry.get() .getBuilder() .setAllowDefaultCodec(true) - .add(new NestedSetCodecWithStore<>(nestedSetStore)) + .add(new NestedSetCodecWithStore(nestedSetStore)) .build(), ImmutableMap.of()); @@ -177,7 +164,7 @@ public class NestedSetCodecTest { AutoRegistry.get() .getBuilder() .setAllowDefaultCodec(true) - .add(new NestedSetCodecWithStore<>(mockNestedSetStore)) + .add(new NestedSetCodecWithStore(mockNestedSetStore)) .build()); NestedSet singletonNestedSet = new NestedSetBuilder(Order.STABLE_ORDER).add("a").build(); @@ -198,7 +185,7 @@ public class NestedSetCodecTest { AutoRegistry.get() .getBuilder() .setAllowDefaultCodec(true) - .add(new NestedSetCodecWithStore<>(nestedSetStore)) + .add(new NestedSetCodecWithStore(nestedSetStore)) .build()); NestedSet subset1 = -- cgit v1.2.3