コード例 #1
0
ファイル: PoolFilterTest.java プロジェクト: jstarek/dcache
 @Test
 public void shouldNotMatchPoolOperationWhenPoolStatusDoesNotMatch() {
   givenFilterWith(null, null, "RESTART", false, false, false, null, null, null, null);
   givenPoolOperationWith(
       System.currentTimeMillis(), System.currentTimeMillis(), "DOWN", "WAITING");
   assertFalse(filter.matches("resilient_pool-0", poolOperation));
 }
コード例 #2
0
ファイル: PoolFilterTest.java プロジェクト: jstarek/dcache
 @Test
 public void shouldMatchPoolOperationWhenPoolStateMatches() {
   givenFilterWith(null, "WAITING,RUNNING", null, false, false, false, null, null, null, null);
   givenPoolOperationWith(
       System.currentTimeMillis(), System.currentTimeMillis(), "DOWN", "WAITING");
   assertTrue(filter.matches("resilient_pool-0", poolOperation));
 }
コード例 #3
0
ファイル: PoolFilterTest.java プロジェクト: jstarek/dcache
 @Test
 public void shouldMatchPoolOperationWhenAfterUpdateMatches() {
   givenFilterWith(
       null, null, null, false, false, false, System.currentTimeMillis(), null, null, null);
   givenPoolOperationWith(
       System.currentTimeMillis(),
       System.currentTimeMillis() - TimeUnit.HOURS.toMillis(1),
       "DOWN",
       "WAITING");
   assertTrue(filter.matches("resilient_pool-0", poolOperation));
 }
コード例 #4
0
ファイル: PoolFilterTest.java プロジェクト: jstarek/dcache
 @Test
 public void shouldNotMatchPoolOperationWhenBeforeUpdateDoesNotMatch() {
   givenFilterWith(
       null,
       null,
       "RESTART",
       false,
       false,
       false,
       System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2),
       null,
       null,
       null);
   givenPoolOperationWith(
       System.currentTimeMillis(),
       System.currentTimeMillis() - TimeUnit.HOURS.toMillis(1),
       "DOWN",
       "WAITING");
   assertFalse(filter.matches("resilient_pool-0", poolOperation));
 }
コード例 #5
0
ファイル: PoolFilterTest.java プロジェクト: jstarek/dcache
 @Test
 public void shouldMatchFileOperationWhenSourceMatchesSourcePool() throws CacheException {
   givenFilterWith("resilient_pool-0", null, null, false, true, false, null, null, null, null);
   givenFileOperationWith(null, "resilient_pool-0", null);
   assertTrue(filter.matches(fileOperation, poolInfoMap));
 }
コード例 #6
0
ファイル: PoolFilterTest.java プロジェクト: jstarek/dcache
 @Test
 public void shouldNotMatchFileOperationWhenTargetDoesNotMatchTargetPool() throws CacheException {
   givenFilterWith("resilient_pool-0", null, null, false, false, true, null, null, null, null);
   givenFileOperationWith(null, null, null);
   assertFalse(filter.matches(fileOperation, poolInfoMap));
 }