jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1574078 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationRefreshTest.java
Date Tue, 04 Mar 2014 13:01:49 GMT
Author: mduerig
Date: Tue Mar  4 13:01:49 2014
New Revision: 1574078

URL: http://svn.apache.org/r1574078
Log:
OAK-1267: Failure in ObservationRefreshTest
Remove redundant assertion in favour of more accurate error reporting

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationRefreshTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationRefreshTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationRefreshTest.java?rev=1574078&r1=1574077&r2=1574078&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationRefreshTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/observation/ObservationRefreshTest.java
Tue Mar  4 13:01:49 2014
@@ -113,13 +113,12 @@ public class ObservationRefreshTest exte
                 n.addNode("n" + i);
                 n.getSession().save();
             }
-            assertTrue("Gave up waiting for events",
-                Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
-                    @Override
-                    public boolean evaluate() {
-                        return listener.numAdded == 1000;
-                    }
-                }));
+            Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
+                @Override
+                public boolean evaluate() {
+                    return listener.numAdded == 1000;
+                }
+            });
             assertEquals("", listener.error);
             assertEquals("added nodes", 1000, listener.numAdded);
 
@@ -127,13 +126,12 @@ public class ObservationRefreshTest exte
                 n.getNode("n" + i).remove();
                 n.getSession().save();
             }
-            assertTrue("Gave up waiting for events",
-                Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
-                    @Override
-                    public boolean evaluate() {
-                        return listener.numRemoved == 1000;
-                    }
-                }));
+            Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
+                @Override
+                public boolean evaluate() {
+                    return listener.numRemoved == 1000;
+                }
+            });
             assertEquals("", listener.error);
             assertEquals("removed nodes", 1000, listener.numRemoved);
 
@@ -141,13 +139,12 @@ public class ObservationRefreshTest exte
                 n.setProperty("test" + i, "foo");
                 n.getSession().save();
             }
-            assertTrue("Gave up waiting for events",
-                Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
-                    @Override
-                    public boolean evaluate() {
-                        return listener.numPropsAdded == 1100;
-                    }
-                }));
+            Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
+                @Override
+                public boolean evaluate() {
+                    return listener.numPropsAdded == 1100;
+                }
+            });
             assertEquals("", listener.error);
             assertEquals("properties added", 1100, listener.numPropsAdded);
 
@@ -155,13 +152,12 @@ public class ObservationRefreshTest exte
                 n.setProperty("test" + i, i);
                 n.getSession().save();
             }
-            assertTrue("Gave up waiting for events",
-                Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
-                    @Override
-                    public boolean evaluate() {
-                        return listener.numPropsModified == 100;
-                    }
-                }));
+            Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
+                @Override
+                public boolean evaluate() {
+                    return listener.numPropsModified == 100;
+                }
+            });
             assertEquals("", listener.error);
             assertEquals("properties modified", 100, listener.numPropsModified);
 
@@ -191,13 +187,12 @@ public class ObservationRefreshTest exte
                 n.getProperty("test" + i).remove();
                 n.getSession().save();
             }
-            assertTrue("Gave up waiting for events",
-                Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
-                    @Override
-                    public boolean evaluate() {
-                        return listener.numPropsRemoved == 1100;
-                    }
-                }));
+            Timer.waitFor(CONDITION_TIMEOUT, new Condition() {
+                @Override
+                public boolean evaluate() {
+                    return listener.numPropsRemoved == 1100;
+                }
+            });
             assertEquals("", listener.error);
             assertEquals("properties removed", 1100, listener.numPropsRemoved);
         }



Mime
View raw message