Skip to content

Commit

Permalink
gh-2435 persistent table on github
Browse files Browse the repository at this point in the history
  • Loading branch information
GCHQDev404 committed Jun 11, 2021
1 parent 4ce89ac commit efbf0d8
Showing 1 changed file with 12 additions and 4 deletions.
Expand Up @@ -22,7 +22,10 @@
import org.junit.Test;

import uk.gov.gchq.gaffer.accumulostore.AccumuloProperties;
import uk.gov.gchq.gaffer.accumulostore.SingleUseAccumuloStore;
import uk.gov.gchq.gaffer.accumulostore.utils.TableUtils;
import uk.gov.gchq.gaffer.cache.CacheServiceLoader;
import uk.gov.gchq.gaffer.commonutil.ExecutorService;
import uk.gov.gchq.gaffer.commonutil.StreamUtil;
import uk.gov.gchq.gaffer.federatedstore.FederatedAccess;
import uk.gov.gchq.gaffer.federatedstore.FederatedStoreCache;
Expand All @@ -37,6 +40,7 @@
import uk.gov.gchq.gaffer.graph.GraphSerialisable;
import uk.gov.gchq.gaffer.integration.AbstractStoreIT;
import uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser;
import uk.gov.gchq.gaffer.store.library.HashMapGraphLibrary;
import uk.gov.gchq.gaffer.store.schema.Schema;
import uk.gov.gchq.gaffer.user.User;

Expand Down Expand Up @@ -445,6 +449,14 @@ public void shouldChangeGraphIdForOwnGraph() throws Exception {
//given
final String graphA = "graphTableA";
final String graphB = "graphTableB";
Connector connector = TableUtils.getConnector(ACCUMULO_PROPERTIES.getInstance(),
ACCUMULO_PROPERTIES.getZookeepers(),
ACCUMULO_PROPERTIES.getUser(),
ACCUMULO_PROPERTIES.getPassword());

connector.tableOperations().delete(graphA);
connector.tableOperations().delete(graphB);

graph.execute(new AddGraph.Builder()
.graphId(graphA)
.schema(new Schema())
Expand All @@ -453,10 +465,6 @@ public void shouldChangeGraphIdForOwnGraph() throws Exception {
.build(), user);
assertTrue(Lists.newArrayList(graph.execute(new GetAllGraphIds(), user)).contains(graphA));

Connector connector = TableUtils.getConnector(ACCUMULO_PROPERTIES.getInstance(),
ACCUMULO_PROPERTIES.getZookeepers(),
ACCUMULO_PROPERTIES.getUser(),
ACCUMULO_PROPERTIES.getPassword());

//when
boolean tableGraphABefore = connector.tableOperations().exists(graphA);
Expand Down

0 comments on commit efbf0d8

Please sign in to comment.