commit | 15193091f9fa81a96b6b35bdaf1a6aad9e130346 | [log] [tgz] |
---|---|---|
author | Pankaj Berde <pankaj@onlab.us> | Thu Mar 21 17:30:14 2013 -0700 |
committer | Pankaj Berde <pankaj@onlab.us> | Thu Mar 21 17:30:14 2013 -0700 |
tree | 58330977d252fb6f3de99726d43bfa88511a576a | |
parent | 22af578eafe68e78b257cba83da9e5daf4d2f531 [diff] |
Reduced graph handles and thread locals
diff --git a/src/test/java/net/floodlightcontroller/core/internal/SwitchStorageImplTest.java b/src/test/java/net/floodlightcontroller/core/internal/SwitchStorageImplTest.java index c24e058..a187d4c 100644 --- a/src/test/java/net/floodlightcontroller/core/internal/SwitchStorageImplTest.java +++ b/src/test/java/net/floodlightcontroller/core/internal/SwitchStorageImplTest.java
@@ -41,7 +41,7 @@ titanGraph = TestDatabaseManager.getTestDatabase(); TestDatabaseManager.populateTestData(titanGraph); - switchStorage = new TestableSwitchStorageImpl(titanGraph); + switchStorage = new TestableSwitchStorageImpl(); } @After
diff --git a/src/test/java/net/floodlightcontroller/core/internal/TestableSwitchStorageImpl.java b/src/test/java/net/floodlightcontroller/core/internal/TestableSwitchStorageImpl.java index 0d429e6..73d517f 100644 --- a/src/test/java/net/floodlightcontroller/core/internal/TestableSwitchStorageImpl.java +++ b/src/test/java/net/floodlightcontroller/core/internal/TestableSwitchStorageImpl.java
@@ -18,21 +18,13 @@ public class TestableSwitchStorageImpl extends SwitchStorageImpl { - public TestableSwitchStorageImpl(TitanGraph graph){ - this.graph = graph; + public TestableSwitchStorageImpl(){ } @Override public void init(String conf){ - Set<String> s = graph.getIndexedKeys(Vertex.class); - if (!s.contains("dpid")) { - graph.createKeyIndex("dpid", Vertex.class); - graph.stopTransaction(Conclusion.SUCCESS); - } - if (!s.contains("type")) { - graph.createKeyIndex("type", Vertex.class); - graph.stopTransaction(Conclusion.SUCCESS); - } + + super.init(conf); } }