cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bened...@apache.org
Subject [06/10] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Date Thu, 06 Aug 2015 12:59:59 GMT
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
	test/unit/org/apache/cassandra/Util.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7636a6b8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7636a6b8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7636a6b8

Branch: refs/heads/cassandra-2.2
Commit: 7636a6b860cddb614b92721b9886fdbeb23887f9
Parents: 32bc8b0 e1bb792
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Thu Aug 6 14:46:38 2015 +0200
Committer: Benedict Elliott Smith <benedict@apache.org>
Committed: Thu Aug 6 14:46:38 2015 +0200

----------------------------------------------------------------------
 test/unit/org/apache/cassandra/Util.java        |  6 +-
 .../cassandra/concurrent/WaitQueueTest.java     | 91 ++++++--------------
 2 files changed, 32 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7636a6b8/test/unit/org/apache/cassandra/Util.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/Util.java
index 08cc093,e05468f..da81aaa
--- a/test/unit/org/apache/cassandra/Util.java
+++ b/test/unit/org/apache/cassandra/Util.java
@@@ -382,16 -377,8 +382,20 @@@ public class Uti
          return new RangeTombstone(startName, endName, timestamp , localtime);
      }
  
- 
 +    public static void spinAssertEquals(Object expected, Supplier<Object> s, int timeoutInSeconds)
 +    {
 +        long now = System.currentTimeMillis();
 +        while (System.currentTimeMillis() - now < now + (1000 * timeoutInSeconds))
 +        {
 +            if (s.get().equals(expected))
 +                break;
 +            Thread.yield();
 +        }
 +        assertEquals(expected, s.get());
 +    }
++
+     public static void joinThread(Thread thread) throws InterruptedException
+     {
+         thread.join(10000);
+     }
  }


Mime
View raw message