Skip to content

Commit 5924501

Browse files
rkhajahkernbach
authored andcommitted
Bug fix/274 (#275)
* Added @afterclass test fixture to drop database containing collections: edge_drop and vertex_drop that was causing ArangoDatabaseTest.getCollectionsExcludeSystem() to fail. * Renamed variables for clarity.
1 parent 3992ac4 commit 5924501

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/test/java/com/arangodb/ArangoDatabaseTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,14 @@ public void getCollections() {
509509
public void getCollectionsExcludeSystem() {
510510
try {
511511
final CollectionsReadOptions options = new CollectionsReadOptions().excludeSystem(true);
512-
final Collection<CollectionEntity> systemCollections = db.getCollections(options);
512+
final Collection<CollectionEntity> nonSystemCollections = db.getCollections(options);
513513

514-
assertThat(systemCollections.size(), is(0));
514+
assertThat(nonSystemCollections.size(), is(0));
515515
db.createCollection(COLLECTION_NAME + "1", null);
516516
db.createCollection(COLLECTION_NAME + "2", null);
517-
final Collection<CollectionEntity> collections = db.getCollections(options);
518-
assertThat(collections.size(), is(2));
519-
assertThat(collections, is(notNullValue()));
517+
final Collection<CollectionEntity> newCollections = db.getCollections(options);
518+
assertThat(newCollections.size(), is(2));
519+
assertThat(newCollections, is(notNullValue()));
520520
} catch (final ArangoDBException e) {
521521
System.out.println(e.getErrorMessage());
522522
} finally {

src/test/java/com/arangodb/ArangoGraphTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.Iterator;
3434

3535
import org.junit.After;
36+
import org.junit.AfterClass;
3637
import org.junit.Before;
3738
import org.junit.Test;
3839
import org.junit.runner.RunWith;
@@ -288,4 +289,8 @@ public void dropPlusDropCollections() {
288289
assertThat(db.collection(vertexCollection).exists(), is(false));
289290
}
290291

292+
@AfterClass
293+
public static void shutdown() {
294+
db.drop();
295+
}
291296
}

0 commit comments

Comments
 (0)