Skip to content

Commit a0fd2bc

Browse files
committed
fix test
1 parent 5b989c1 commit a0fd2bc

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

src/test/java/com/arangodb/ArangoDBTest.java

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -105,31 +105,17 @@ public void createAndDeleteDatabase() {
105105

106106
@Test
107107
public void getDatabases() {
108-
try {
109-
Collection<String> dbs = arangoDB.getDatabases();
110-
assertThat(dbs, is(notNullValue()));
111-
assertThat(dbs.size(), is(greaterThan(0)));
112-
final int dbCount = dbs.size();
113-
//assertThat(dbs.iterator().next(), is("_system"));
114-
assertThat(dbs, hasItem(BaseTest.TEST_DB));
115-
arangoDB.createDatabase(BaseTest.TEST_DB_CUSTOM);
116-
dbs = arangoDB.getDatabases();
117-
assertThat(dbs.size(), is(greaterThan(dbCount)));
118-
assertThat(dbs, hasItem("_system"));
119-
assertThat(dbs, hasItem(BaseTest.TEST_DB_CUSTOM));
120-
assertThat(dbs, hasItem(BaseTest.TEST_DB));
121-
} catch (ArangoDBException e) {
122-
System.out.println("ArangoDBException");
123-
System.out.println(e.getException());
124-
System.out.println("Response code: " + e.getResponseCode());
125-
System.out.println("Error num: " + e.getErrorNum());
126-
System.out.println("Message: " + e.getMessage());
127-
} catch (AssertionError assertionError) {
128-
System.out.println("AssertionError");
129-
System.out.println(assertionError.getMessage());
130-
} finally {
131-
arangoDB.db(BaseTest.TEST_DB_CUSTOM).drop();
132-
}
108+
Collection<String> dbs = arangoDB.getDatabases();
109+
assertThat(dbs, is(notNullValue()));
110+
assertThat(dbs.size(), is(greaterThan(0)));
111+
final int dbCount = dbs.size();
112+
assertThat(dbs.iterator().next(), is("_system"));
113+
arangoDB.createDatabase(BaseTest.TEST_DB_CUSTOM);
114+
dbs = arangoDB.getDatabases();
115+
assertThat(dbs.size(), is(greaterThan(dbCount)));
116+
assertThat(dbs, hasItem("_system"));
117+
assertThat(dbs, hasItem(BaseTest.TEST_DB_CUSTOM));
118+
arangoDB.db(BaseTest.TEST_DB_CUSTOM).drop();
133119
}
134120

135121
@Test

0 commit comments

Comments
 (0)