Skip to content
Browse files

Fix indentation on test

  • Loading branch information...
1 parent ec2e7e5 commit 3f5f96efa36049e33b3ebdcbdba94cacc2317df9 @dgomezferro committed
Showing with 78 additions and 79 deletions.
  1. +78 −79 src/test/java/com/yahoo/omid/client/TestSharedAbortedSet.java
View
157 src/test/java/com/yahoo/omid/client/TestSharedAbortedSet.java
@@ -23,85 +23,84 @@
public class TestSharedAbortedSet {
@Test
- public void testSimpleOps() throws Exception {
- SharedAbortedSet aborted = new SharedAbortedSet();
- aborted.add(12l);
- assertTrue("The reported abort is lost", aborted.contains(12l));
- aborted.remove(12l);
- assertFalse("The reported full abort is lost", aborted.contains(12l));
- aborted.add(13l);
- assertTrue("The reported abort is lost", aborted.contains(13l));
- aborted.transactionStarted(25l);
- aborted.remove(13l);
- assertTrue("The full abort changes the read snapshot of a running transaction", aborted.contains(13l));
- aborted.add(14l);
- assertTrue("The reported abort is lost", aborted.contains(14l));
- aborted.transactionFinished(25l);
- assertFalse("The full abort is lost, even after commit of the outstanding transaction", aborted.contains(13l));
- assertTrue("The reported abort is lost", aborted.contains(14l));
- aborted.remove(14l);
- assertFalse("The full abort is lost, although there is no outstanding transaction", aborted.contains(14l));
- }
+ public void testSimpleOps() throws Exception {
+ SharedAbortedSet aborted = new SharedAbortedSet();
+ aborted.add(12l);
+ assertTrue("The reported abort is lost", aborted.contains(12l));
+ aborted.remove(12l);
+ assertFalse("The reported full abort is lost", aborted.contains(12l));
+ aborted.add(13l);
+ assertTrue("The reported abort is lost", aborted.contains(13l));
+ aborted.transactionStarted(25l);
+ aborted.remove(13l);
+ assertTrue("The full abort changes the read snapshot of a running transaction", aborted.contains(13l));
+ aborted.add(14l);
+ assertTrue("The reported abort is lost", aborted.contains(14l));
+ aborted.transactionFinished(25l);
+ assertFalse("The full abort is lost, even after commit of the outstanding transaction", aborted.contains(13l));
+ assertTrue("The reported abort is lost", aborted.contains(14l));
+ aborted.remove(14l);
+ assertFalse("The full abort is lost, although there is no outstanding transaction", aborted.contains(14l));
+ }
@Test
- public void testComplexSequences() throws Exception {
- SharedAbortedSet aborted = new SharedAbortedSet();
- aborted.add(12l);
- aborted.add(13l);
- aborted.add(14l);
- aborted.add(15l);
- aborted.add(16l);
- aborted.add(17l);
- aborted.transactionStarted(25l);
- aborted.remove(12l);
- aborted.transactionStarted(26l);
- aborted.remove(13l);
- aborted.remove(14l);
- aborted.remove(15l);
- aborted.transactionStarted(27l);
- aborted.remove(16l);
- aborted.transactionStarted(28l);
- aborted.remove(17l);
- assertTrue("The reported abort is lost", aborted.contains(12l));
- assertTrue("The reported abort is lost", aborted.contains(13l));
- assertTrue("The reported abort is lost", aborted.contains(14l));
- assertTrue("The reported abort is lost", aborted.contains(15l));
- assertTrue("The reported abort is lost", aborted.contains(16l));
- assertTrue("The reported abort is lost", aborted.contains(17l));
- assertTrue("The reported abort is lost", aborted.contains(12l));
- assertTrue("The reported abort is lost", aborted.contains(13l));
- assertTrue("The reported abort is lost", aborted.contains(14l));
- assertTrue("The reported abort is lost", aborted.contains(15l));
- assertTrue("The reported abort is lost", aborted.contains(16l));
- assertTrue("The reported abort is lost", aborted.contains(17l));
- aborted.transactionFinished(25l);
- assertFalse("The reported full abort is lost", aborted.contains(12l));
- assertTrue("The reported abort is lost", aborted.contains(13l));
- assertTrue("The reported abort is lost", aborted.contains(14l));
- assertTrue("The reported abort is lost", aborted.contains(15l));
- assertTrue("The reported abort is lost", aborted.contains(16l));
- assertTrue("The reported abort is lost", aborted.contains(17l));
- aborted.transactionFinished(26l);
- assertFalse("The reported full abort is lost", aborted.contains(12l));
- assertFalse("The reported full abort is lost", aborted.contains(13l));
- assertFalse("The reported full abort is lost", aborted.contains(14l));
- assertFalse("The reported full abort is lost", aborted.contains(15l));
- assertTrue("The reported abort is lost", aborted.contains(16l));
- assertTrue("The reported abort is lost", aborted.contains(17l));
- aborted.transactionFinished(28l);
- assertFalse("The reported full abort is lost", aborted.contains(12l));
- assertFalse("The reported full abort is lost", aborted.contains(13l));
- assertFalse("The reported full abort is lost", aborted.contains(14l));
- assertFalse("The reported full abort is lost", aborted.contains(15l));
- assertTrue("The reported abort is lost", aborted.contains(16l));
- assertTrue("The reported abort is lost", aborted.contains(17l));
- aborted.transactionFinished(27l);
- assertFalse("The reported full abort is lost", aborted.contains(12l));
- assertFalse("The reported full abort is lost", aborted.contains(13l));
- assertFalse("The reported full abort is lost", aborted.contains(14l));
- assertFalse("The reported full abort is lost", aborted.contains(15l));
- assertFalse("The reported full abort is lost", aborted.contains(16l));
- assertFalse("The reported full abort is lost", aborted.contains(17l));
- }
+ public void testComplexSequences() throws Exception {
+ SharedAbortedSet aborted = new SharedAbortedSet();
+ aborted.add(12l);
+ aborted.add(13l);
+ aborted.add(14l);
+ aborted.add(15l);
+ aborted.add(16l);
+ aborted.add(17l);
+ aborted.transactionStarted(25l);
+ aborted.remove(12l);
+ aborted.transactionStarted(26l);
+ aborted.remove(13l);
+ aborted.remove(14l);
+ aborted.remove(15l);
+ aborted.transactionStarted(27l);
+ aborted.remove(16l);
+ aborted.transactionStarted(28l);
+ aborted.remove(17l);
+ assertTrue("The reported abort is lost", aborted.contains(12l));
+ assertTrue("The reported abort is lost", aborted.contains(13l));
+ assertTrue("The reported abort is lost", aborted.contains(14l));
+ assertTrue("The reported abort is lost", aborted.contains(15l));
+ assertTrue("The reported abort is lost", aborted.contains(16l));
+ assertTrue("The reported abort is lost", aborted.contains(17l));
+ assertTrue("The reported abort is lost", aborted.contains(12l));
+ assertTrue("The reported abort is lost", aborted.contains(13l));
+ assertTrue("The reported abort is lost", aborted.contains(14l));
+ assertTrue("The reported abort is lost", aborted.contains(15l));
+ assertTrue("The reported abort is lost", aborted.contains(16l));
+ assertTrue("The reported abort is lost", aborted.contains(17l));
+ aborted.transactionFinished(25l);
+ assertFalse("The reported full abort is lost", aborted.contains(12l));
+ assertTrue("The reported abort is lost", aborted.contains(13l));
+ assertTrue("The reported abort is lost", aborted.contains(14l));
+ assertTrue("The reported abort is lost", aborted.contains(15l));
+ assertTrue("The reported abort is lost", aborted.contains(16l));
+ assertTrue("The reported abort is lost", aborted.contains(17l));
+ aborted.transactionFinished(26l);
+ assertFalse("The reported full abort is lost", aborted.contains(12l));
+ assertFalse("The reported full abort is lost", aborted.contains(13l));
+ assertFalse("The reported full abort is lost", aborted.contains(14l));
+ assertFalse("The reported full abort is lost", aborted.contains(15l));
+ assertTrue("The reported abort is lost", aborted.contains(16l));
+ assertTrue("The reported abort is lost", aborted.contains(17l));
+ aborted.transactionFinished(28l);
+ assertFalse("The reported full abort is lost", aborted.contains(12l));
+ assertFalse("The reported full abort is lost", aborted.contains(13l));
+ assertFalse("The reported full abort is lost", aborted.contains(14l));
+ assertFalse("The reported full abort is lost", aborted.contains(15l));
+ assertTrue("The reported abort is lost", aborted.contains(16l));
+ assertTrue("The reported abort is lost", aborted.contains(17l));
+ aborted.transactionFinished(27l);
+ assertFalse("The reported full abort is lost", aborted.contains(12l));
+ assertFalse("The reported full abort is lost", aborted.contains(13l));
+ assertFalse("The reported full abort is lost", aborted.contains(14l));
+ assertFalse("The reported full abort is lost", aborted.contains(15l));
+ assertFalse("The reported full abort is lost", aborted.contains(16l));
+ assertFalse("The reported full abort is lost", aborted.contains(17l));
+ }
}
-

0 comments on commit 3f5f96e

Please sign in to comment.
Something went wrong with that request. Please try again.