public virtual void PackRefsWhileRefUpdated_refUpdateSucceeds() { RevBlob a = tr.Blob("a"); tr.LightweightTag("t", a); RevBlob b = tr.Blob("b"); CyclicBarrier refUpdateLockedRef = new CyclicBarrier(2); CyclicBarrier packRefsDone = new CyclicBarrier(2); ExecutorService pool = Executors.NewFixedThreadPool(2); try { Future <RefUpdate.Result> result = pool.Submit(new _Callable_185(this, b, refUpdateLockedRef , packRefsDone)); pool.Submit <object>(new _Callable_210(this, refUpdateLockedRef, packRefsDone)); NUnit.Framework.Assert.AreEqual(result.Get(), RefUpdate.Result.FORCED); } finally { pool.ShutdownNow(); pool.AwaitTermination(long.MaxValue, TimeUnit.SECONDS); } NUnit.Framework.Assert.AreEqual(repo.GetRef("refs/tags/t").GetObjectId(), b); }