Merge "Added Security Rule for Custom ICMP"
[netvirt.git] / integrationtest / src / test / java / org / opendaylight / ovsdb / integrationtest / ovsdbclient / OvsdbClientTestIT.java
index d895a765061ac5fac43814edf7cdfa89049cdba1..290367722e1139c5a4123206852f27683f2157cd 100644 (file)
@@ -18,9 +18,8 @@ import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeoutException;
 
-import junit.framework.Assert;
-
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.ovsdb.lib.MonitorCallBack;
@@ -42,8 +41,6 @@ import org.opendaylight.ovsdb.lib.schema.ColumnSchema;
 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
 import org.opendaylight.ovsdb.lib.schema.TableSchema;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
@@ -52,7 +49,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 
 
 public class OvsdbClientTestIT extends OvsdbTestBase {
-    Logger logger = LoggerFactory.getLogger(OvsdbClientTestIT.class);
 
     OvsdbClient ovs;
     DatabaseSchema dbSchema = null;
@@ -122,10 +118,14 @@ public class OvsdbClientTestIT extends OvsdbTestBase {
                 System.out.println("t = " + t);
             }
         });
-        if (updates != null) results.add(updates);
+        if (updates != null) {
+            results.add(updates);
+        }
         for (int i = 0; i < 3 ; i++) { //wait 3 seconds to get a result
             System.out.println("waiting on monitor response for Bridge Table...");
-            if (!results.isEmpty()) break;
+            if (!results.isEmpty()) {
+                break;
+            }
             Thread.sleep(1000);
         }
 
@@ -137,7 +137,9 @@ public class OvsdbClientTestIT extends OvsdbTestBase {
         Assert.assertTrue(update.getRows().size() > 0);
         for (UUID uuid : update.getRows().keySet()) {
             Row<GenericTableSchema> aNew = update.getNew(uuid);
-            if (!aNew.getColumn(name).getData().equals(testBridgeName)) continue;
+            if (!aNew.getColumn(name).getData().equals(testBridgeName)) {
+                continue;
+            }
             if (filter) {
                 Assert.assertEquals(builder.getColumns().size(), aNew.getColumns().size());
             } else {
@@ -326,7 +328,9 @@ public class OvsdbClientTestIT extends OvsdbTestBase {
 
     @After
     public void tearDown() throws InterruptedException, ExecutionException {
-        if (dbSchema == null) return;
+        if (dbSchema == null) {
+            return;
+        }
         TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
         ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
         GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);