Exemple #1
0
 /**
  * Retryが指定回数行われる.
  *
  * @throws InterruptedException InterruptedException
  */
 @Test
 @Ignore
 public void Retryが指定回数行われる() throws InterruptedException {
   LockManager originalLm = LockManager.singleton;
   LockManager.singleton = new RetryCountingLockManager();
   RetryCountingLockManager rclm = (RetryCountingLockManager) LockManager.singleton;
   try {
     LockManager.getLock(Lock.CATEGORY_ODATA, "aaa", null, null);
   } catch (DcCoreException e) {
     assertEquals(DcCoreException.class, e.getClass());
   } finally {
     // doGetLock呼び出し回数 は 最初の呼び出しの1回と + リトライ回数 となる
     assertEquals(LockManager.getLockRetryTimes() + 1, rclm.getCount);
     LockManager.singleton = originalLm;
   }
 }