File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/test/java/com/arangodb/tinkerpop/gremlin Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1919import com .arangodb .ArangoCollection ;
2020import com .arangodb .ArangoDBException ;
2121import com .arangodb .ArangoDatabase ;
22+ import com .arangodb .ArangoGraph ;
2223import com .arangodb .tinkerpop .gremlin .client .ArangoDBGraphClient ;
2324import com .arangodb .tinkerpop .gremlin .structure .ArangoDBGraph ;
2425import com .arangodb .tinkerpop .gremlin .structure .ArangoDBGraphConfig ;
@@ -51,12 +52,9 @@ public void clear(String name) {
5152 }
5253 }
5354
54- try {
55- db .graph (name ).drop (true );
56- } catch (ArangoDBException e ) {
57- Integer errNum = e .getErrorNum ();
58- if (errNum == null || errNum != 1924 ) // graph not found
59- throw e ;
55+ ArangoGraph g = db .graph (name );
56+ if (g .exists ()) {
57+ g .drop (true );
6058 }
6159 }
6260
You can’t perform that action at this time.
0 commit comments