use of org.junit.contrib.java.lang.system.Assertion in project YCSB by brianfrankcooper.
the class IntegrationTest method testDeleteOpsBenchmarkSuccess.
//All delete operations during benchmark are executed successfully with an HTTP OK status.
@Test
public void testDeleteOpsBenchmarkSuccess() throws InterruptedException {
exit.expectSystemExit();
exit.checkAssertionAfterwards(new Assertion() {
@Override
public void checkAssertion() throws Exception {
List<String> results = Utils.read(RESULTS_FILEPATH);
assertEquals(true, results.contains("[DELETE], Return=OK, 1"));
Utils.delete(RESULTS_FILEPATH);
}
});
Client.main(getArgs(TRACE_FILEPATH, 0, 0, 0, 1));
}
use of org.junit.contrib.java.lang.system.Assertion in project YCSB by brianfrankcooper.
the class IntegrationTest method testInsertOpsBenchmarkFailure.
//All read operations during benchmark are executed with an HTTP 500 error.
@Test
public void testInsertOpsBenchmarkFailure() throws InterruptedException {
exit.expectSystemExit();
exit.checkAssertionAfterwards(new Assertion() {
@Override
public void checkAssertion() throws Exception {
List<String> results = Utils.read(RESULTS_FILEPATH);
assertEquals(true, results.contains("[INSERT], Return=ERROR, 1"));
Utils.delete(RESULTS_FILEPATH);
}
});
Client.main(getArgs(ERROR_TRACE_FILEPATH, 0, 1, 0, 0));
}
use of org.junit.contrib.java.lang.system.Assertion in project YCSB by brianfrankcooper.
the class IntegrationTest method testReadOpsBenchmarkSuccess.
// All read operations during benchmark are executed successfully with an HTTP OK status.
@Test
public void testReadOpsBenchmarkSuccess() throws InterruptedException {
exit.expectSystemExit();
exit.checkAssertionAfterwards(new Assertion() {
@Override
public void checkAssertion() throws Exception {
List<String> results = Utils.read(RESULTS_FILEPATH);
assertEquals(true, results.contains("[READ], Return=OK, 1"));
Utils.delete(RESULTS_FILEPATH);
}
});
Client.main(getArgs(TRACE_FILEPATH, 1, 0, 0, 0));
}
use of org.junit.contrib.java.lang.system.Assertion in project YCSB by brianfrankcooper.
the class IntegrationTest method testDeleteOpsBenchmarkFailure.
//All read operations during benchmark are executed with an HTTP 500 error.
@Test
public void testDeleteOpsBenchmarkFailure() throws InterruptedException {
exit.expectSystemExit();
exit.checkAssertionAfterwards(new Assertion() {
@Override
public void checkAssertion() throws Exception {
List<String> results = Utils.read(RESULTS_FILEPATH);
assertEquals(true, results.contains("[DELETE], Return=ERROR, 1"));
Utils.delete(RESULTS_FILEPATH);
}
});
Client.main(getArgs(ERROR_TRACE_FILEPATH, 0, 0, 0, 1));
}
use of org.junit.contrib.java.lang.system.Assertion in project YCSB by brianfrankcooper.
the class IntegrationTest method testUpdateOpsBenchmarkFailure.
//All read operations during benchmark are executed with an HTTP 500 error.
@Test
public void testUpdateOpsBenchmarkFailure() throws InterruptedException {
exit.expectSystemExit();
exit.checkAssertionAfterwards(new Assertion() {
@Override
public void checkAssertion() throws Exception {
List<String> results = Utils.read(RESULTS_FILEPATH);
assertEquals(true, results.contains("[UPDATE], Return=ERROR, 1"));
Utils.delete(RESULTS_FILEPATH);
}
});
Client.main(getArgs(ERROR_TRACE_FILEPATH, 0, 0, 1, 0));
}
Aggregations