Revert TestDatabaseManager to old version.
diff --git a/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java b/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java
index 2b93298..5195b88 100644
--- a/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java
+++ b/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java
@@ -5,14 +5,10 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import java.util.Set;
import junit.framework.Assert;
-import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.ISwitchObject;
-import net.onrc.onos.ofcontroller.core.ISwitchStorage.SwitchState;
import org.apache.commons.io.FileUtils;
@@ -21,7 +17,6 @@
import com.tinkerpop.blueprints.TransactionalGraph.Conclusion;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.util.io.graphml.GraphMLReader;
-import com.tinkerpop.frames.FramedGraph;
public class TestDatabaseManager {
private static final String testDbLocation = "/tmp/onos-testdb";
@@ -63,20 +58,10 @@
Iterator<Vertex> it = titanGraph.getVertices("type", "port").iterator();
while (it.hasNext()){
Vertex port = it.next();
- if(port.getProperty("number").getClass() == Integer.class) {
- Integer portNum = port.getProperty("number");
- port.setProperty("number", portNum.shortValue());
- }
+ Integer portNum = (Integer) port.getProperty("number");
+ port.setProperty("number", portNum.shortValue());
}
- FramedGraph<TitanGraph> fg = new FramedGraph<TitanGraph>(titanGraph);
- Iterable<ISwitchObject> switches = fg.getVertices("type","switch",ISwitchObject.class);
- List<ISwitchObject> activeSwitches = new ArrayList<ISwitchObject>();
-
- for (ISwitchObject sw: switches) {
- sw.setState(SwitchState.ACTIVE.toString());
- }
-
titanGraph.stopTransaction(Conclusion.SUCCESS);
}