use of com.cinchapi.concourse.Concourse in project concourse by cinchapi.
the class CON171 method repro3.
@Test(expected = TransactionException.class)
public void repro3() {
Concourse client2 = Concourse.connect(SERVER_HOST, SERVER_PORT, "admin", "admin");
client.stage();
client2.add("foo", "bar", 1);
client.find("foo", Operator.EQUALS, "bar");
client2.remove("foo", "bar", 1);
Assert.assertFalse(client.find("foo", Operator.EQUALS, "bar").isEmpty());
}
use of com.cinchapi.concourse.Concourse in project concourse by cinchapi.
the class CON171 method repro1.
@Test(expected = TransactionException.class)
public void repro1() {
Concourse client2 = Concourse.connect(SERVER_HOST, SERVER_PORT, "admin", "admin");
client.stage();
client.find("foo", Operator.EQUALS, "bar");
client2.set("foo", "bar", 1);
Assert.assertTrue(client.find("foo", Operator.EQUALS, "bar").isEmpty());
}
use of com.cinchapi.concourse.Concourse in project concourse by cinchapi.
the class ManagedConcourseServerTest method testClientFindWithTime.
@Test
public void testClientFindWithTime() {
server.start();
Concourse concourse = server.connect();
concourse.add("foo", 1, 1);
Timestamp timestamp = Timestamp.now();
concourse.add("foo", 1, 2);
Assert.assertFalse(concourse.find("foo", Operator.EQUALS, 1, timestamp).contains(2L));
}
use of com.cinchapi.concourse.Concourse in project concourse by cinchapi.
the class ManagedConcourseServerTest method testCalculator.
@Test(expected = UnsupportedOperationException.class)
public void testCalculator() {
server.start();
Concourse concourse = server.connect();
concourse.add("age", 20);
concourse.add("age", 40);
Assert.assertEquals(60, concourse.calculate().sum("age"));
}
use of com.cinchapi.concourse.Concourse in project concourse by cinchapi.
the class GH426 method testReproGH426.
@Test
public void testReproGH426() {
ConcourseCodebase codebase = ConcourseCodebase.cloneFromGithub();
String installer = codebase.buildInstaller();
ManagedConcourseServer server = ManagedConcourseServer.manageNewServer(new File(installer));
server.start();
Concourse client = server.connect();
long record = client.add("name", "jeff");
Assert.assertEquals("jeff", client.get("name", record));
}
Aggregations