コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void terminateSharedLockAcquisition() throws InterruptedException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void TerminateSharedLockAcquisition()
        {
            _client.acquireExclusive(LockTracer.NONE, ResourceTypes.Node, 1);
            Future <bool> sharedLockAcquisition = ThreadB.execute(state =>
            {
                _client2.acquireShared(LockTracer.NONE, ResourceTypes.Node, 1);
                return(true);
            });

            assertThat(ThreadB, Waiting);

            _clock.forward(101, TimeUnit.MILLISECONDS);

            VerifyAcquisitionFailure(sharedLockAcquisition);
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void shutdown()
        public virtual void Shutdown()
        {
            ThreadA.interrupt();
            ThreadB.interrupt();
            ThreadC.interrupt();
        }