@Override public Void call() throws Exception { waitForClusterToForm(); log.debug("3rd has join"); return null; } });
@Override public Object call() throws Exception { log.debug("active status modifier started"); scl.activeStatusChanged(true); scl.pushStateFuture.get(); return null; } }
@Override public void beforeOperation(Cache cache) { try { cache.remove(SHARED_KEY); } catch (CacheException e) { log.debug("Write skew check error while removing the key", e); } } }
@AfterMethod public void tearDown() { log.debug("**** - STARTING TEARDOWN - ****"); TestingUtil.killCacheManagers(cm); lockTestData = null; }
@Override protected void teardown() { log.debug("Killing Hot Rod server"); killServer(server); }
public void stopBlocking() { log.debug("Stopping intercepting RPC calls"); stopped = true; executor.shutdownNow(); throwGlobalError(); if (!waiters.isEmpty()) { fail("Stopped intercepting RPCs, but there are " + waiters.size() + " waiters in the queue"); } }
@Override public void run() { try { log.trace("Started fork runnable.."); realOne.run(); log.debug("Exiting fork runnable."); } catch (Throwable e) { log.warn("Exiting fork runnable due to exception", e); throw e; } } }
@Override public void split(BaseTxPartitionAndMergeTest test) { test.getLog().debug("Splitting cluster isolating the originator."); test.splitCluster(new int[]{0}, new int[]{1, 2, 3}); assertDegradedPartition(test, 0); TestingUtil.waitForNoRebalance(test.cache(1), test.cache(2), test.cache(3)); test.getLog().debug("Cluster split."); } },
@Override public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable { try { return invokeNextInterceptor(ctx, command); } finally { getLog().debug("visit Prepare"); if (awaitPrepare != null) { getLog().debug("Prepare Received... unblocking"); awaitPrepare.open(); } } }
@Override public void split(BaseTxPartitionAndMergeTest test) { test.getLog().debug("Splitting cluster isolating a primary owner."); test.splitCluster(new int[]{2}, new int[]{0, 1, 3}); assertDegradedPartition(test, 0); TestingUtil.waitForNoRebalance(test.cache(0), test.cache(1), test.cache(3)); test.getLog().debug("Cluster split."); } };
public void testSimpleEvictionMaxEntries() throws Exception { log.tracef("Max entries: ", MAX_CACHE_ELEMENTS); for (int i = 0; i < MAX_CACHE_ELEMENTS; i++) { Integer integer = Integer.valueOf(i); cache.put(integer, integer, 6, TimeUnit.HOURS); if (i % 50000 == 0) { log.tracef("Elements in cache: %s", cache.size()); } } log.debug("Finished filling in cache. Now idle while evicting thread works...."); Thread.sleep(TimeUnit.MILLISECONDS.convert(2, TimeUnit.HOURS)); }
public void testFailure() throws Exception { TransactionManager transactionManager = cache.getAdvancedCache().getTransactionManager(); transactionManager.begin(); try { cache.put("k", "v"); assert false; } catch (Exception e) { log.debug("Ignoring expected exception during put", e); assertEquals(transactionManager.getTransaction().getStatus(), Status.STATUS_MARKED_ROLLBACK); } } }
@Override public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable { try { return invokeNextInterceptor(ctx, command); } finally { getLog().debug("visit GetKeyValueCommand"); if (!ctx.isOriginLocal() && blockRemoteGet != null) { getLog().debug("Remote Get Received... blocking..."); blockRemoteGet.await(30, TimeUnit.SECONDS); } } }
@Override public Object visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command) throws Throwable { try { return invokeNextInterceptor(ctx, command); } finally { getLog().debug("visit GetCacheEntryCommand"); if (!ctx.isOriginLocal() && blockRemoteGet != null) { getLog().debug("Remote Get Received... blocking..."); blockRemoteGet.await(30, TimeUnit.SECONDS); } } }
@AfterMethod(alwaysRun = true) protected void clearContent() throws Throwable { if (cleanupAfterTest()) { log.debug("*** Test method complete; clearing contents on all caches."); TestingUtil.clearContent(cacheManagers); } else { TestingUtil.clearContent(cacheManagers); TestingUtil.killCacheManagers(cacheManagers); TestResourceTracker.cleanUpResources(getTestName()); cacheManagers.clear(); } }
@Override public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable { assertFalse(ctx.isOriginLocal()); InvocationStage invocationStage = makeStage(invokeNext(ctx, command)); assertFalse(invocationStage.toString(), invocationStage.isDone()); log.debug("Received incomplete stage"); latch.countDown(); return invocationStage; }
@CacheEntryRemoved @CacheEntryModified public void callback(TransactionalEvent e) { log.trace("Callback got event " + e); log.debug("Callback got event " + e); assertFalse("entry was removed on remote cache so isLocal should be false", e.isOriginLocal()); } }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder defaultConfig = getDefaultClusteredCacheConfig(cacheMode); log.debug("defaultConfig = " + defaultConfig.build().clustering().hash().numOwners()); defaultConfig.clustering().l1().disable().stateTransfer().fetchInMemoryState(true); createClusteredCaches(5, defaultConfig); ConsistentHash hash = cache(0).getAdvancedCache().getDistributionManager().getWriteConsistentHash(); List<Address> members = hash.getMembers(); addresses = members.toArray(new Address[members.size()]); }