/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { corruptionEnabled = false; super.afterTest(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); stopAllGrids(); cleanPersistenceDir(); }
/** * Ignite configuration for client. */ @NotNull private IgniteConfiguration getClientConfiguration(int nodesPrefix) throws Exception { IgniteConfiguration clientConf = getConfiguration(getTestIgniteInstanceName(nodesPrefix)); clientConf.setClientMode(true); return clientConf; }
startGrids(nodesCount()); IgniteEx igniteClient = startGrid(getClientConfiguration(nodesCount())); int[] initAmounts = new int[txThreadsCount()]; completedTxs = new ConcurrentLinkedHashMap[txThreadsCount()]; for (int cachePrefixIdx = 0; cachePrefixIdx < txThreadsCount(); cachePrefixIdx++) { IgniteCache<Integer, AccountState> cache = igniteClient.getOrCreateCache(cacheName(cachePrefixIdx)); for (int accountId = 0; accountId < accountsCount(); accountId++) { Set<Integer> initAmount = generateCoins(coinsCntr, 5); CountDownLatch firstTransactionDone = new CountDownLatch(txThreadsCount()); for (int i = 0; i < txThreadsCount(); i++) { transferThreads.add(new TransferAmountTxThread(firstTransactionDone, igniteClient, cacheName(i), i, colocatedAccounts)); consistencyCheck(initAmounts);
for (int j = 0; j < txThreadsCount(); j++) { List<Integer> totalCoins = new ArrayList<>(); String cacheName = cacheName(j); AccountState[] accStates = new AccountState[accountsCount()]; for (int i = 0; i < accountsCount(); i++) { AccountState state = cache.get(i); log.error("Tx: " + tx); for (int i = 0; i < accountsCount(); i++) log.error("Account state " + i + " = " + accStates[i]); assertFalse("Test failed. See messages above", true);
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10470", MvccFeatureChecker.forcedMvcc()); super.beforeTest(); }
accIdFrom = random.nextInt(accountsCount()); accIdTo = random.nextInt(accountsCount());
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); stopAllGrids(); cleanPersistenceDir(); }