ONOS-1057 - Remove references to deprecated applyBatch() method
Change-Id: I9215fde6be2acaa2becea58d8b6e5b171ff16817
diff --git a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
index 3fd8b5a..fbda6cd 100644
--- a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java
@@ -15,12 +15,19 @@
*/
package org.onosproject.net.flow.impl;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.MoreExecutors;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicLong;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -45,7 +52,6 @@
import org.onosproject.net.flow.FlowEntry;
import org.onosproject.net.flow.FlowEntry.FlowEntryState;
import org.onosproject.net.flow.FlowRule;
-import org.onosproject.net.flow.FlowRuleBatchEntry;
import org.onosproject.net.flow.FlowRuleBatchOperation;
import org.onosproject.net.flow.FlowRuleEvent;
import org.onosproject.net.flow.FlowRuleListener;
@@ -62,22 +68,22 @@
import org.onosproject.net.provider.ProviderId;
import org.onosproject.store.trivial.impl.SimpleFlowRuleStore;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicLong;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
-import static org.junit.Assert.*;
-import static org.onosproject.net.flow.FlowRuleEvent.Type.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_ADDED;
+import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_ADD_REQUESTED;
+import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_REMOVED;
+import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_REMOVE_REQUESTED;
+import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_UPDATED;
/**
* Test codifying the flow rule service & flow rule provider service contracts.
@@ -387,42 +393,6 @@
f2, FlowEntryState.PENDING_REMOVE));
}
- @Test
- public void applyBatch() {
- FlowRule f1 = flowRule(1, 1);
- FlowRule f2 = flowRule(2, 2);
-
-
- mgr.applyFlowRules(f1);
-
- FlowEntry fe1 = new DefaultFlowEntry(f1);
- providerService.pushFlowMetrics(DID, Collections.<FlowEntry>singletonList(fe1));
-
- FlowRuleBatchEntry fbe1 = new FlowRuleBatchEntry(
- FlowRuleBatchEntry.FlowRuleOperation.REMOVE, f1);
-
- FlowRuleBatchEntry fbe2 = new FlowRuleBatchEntry(
- FlowRuleBatchEntry.FlowRuleOperation.ADD, f2);
-
- FlowRuleBatchOperation fbo = new FlowRuleBatchOperation(
- Lists.newArrayList(fbe1, fbe2), null, 0);
- Future<CompletedBatchOperation> future = mgr.applyBatch(fbo);
- assertTrue("Entries in wrong state",
- validateState(ImmutableMap.of(
- f1, FlowEntryState.PENDING_REMOVE,
- f2, FlowEntryState.PENDING_ADD)));
- CompletedBatchOperation completed = null;
- try {
- completed = future.get();
- } catch (InterruptedException | ExecutionException e) {
- fail("Unexpected exception: " + e);
- }
- if (!completed.isSuccess()) {
- fail("Installation should be a success");
- }
-
- }
-
private static class TestListener implements FlowRuleListener {
final List<FlowRuleEvent> events = new ArrayList<>();