Skip to content

Commit

Permalink
Close the catalog after the test. Not really needed but nice to do (a…
Browse files Browse the repository at this point in the history
…nd test).
  • Loading branch information
domoritz committed Jun 4, 2015
1 parent 7551d60 commit 6780c98
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public void testCatalogCreation() throws CatalogException {
for (final String worker : WORKERS) {
assertTrue(values.contains(SocketInfo.valueOf(worker)));
}

catalog.close();
}

/**
Expand Down Expand Up @@ -252,6 +254,8 @@ public void testCatalogQuerySearch() throws CatalogException {
assertEquals(2, queries.size());
assertEquals(Long.valueOf(3L), queries.get(0).queryId);
assertEquals(Long.valueOf(2L), queries.get(1).queryId);

catalog.close();
}

/**
Expand Down Expand Up @@ -342,5 +346,7 @@ public void testCatalogExtraFieldsList() throws CatalogException {
assertEquals(null, qs.logicalRa);
assertEquals(ImmutableSet.copyOf(qs.profilingMode), ImmutableSet.copyOf(query.profilingMode));
assertEquals(qs.language, query.language);

catalog.close();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

Expand Down Expand Up @@ -48,6 +49,14 @@ public void setUp() throws Exception {
catalog.newQuery(query);
}

/**
* Destroy catalog.
*/
@After
public void Cleanup() {
catalog.close();
}

@Test
public final void testQueryQueries() throws DbException, CatalogException {
Schema schema = new Schema(ImmutableList.of(Type.LONG_TYPE, Type.STRING_TYPE), ImmutableList.of("id", "raw"));
Expand Down

0 comments on commit 6780c98

Please sign in to comment.