/** */ private void resetSaslStaticFields() { Configuration.setConfiguration(null); GridTestUtils.setFieldValue(ZooKeeperSaslClient.class, "initializedLogin", false); GridTestUtils.setFieldValue(ZooKeeperSaslClient.class, "login", null); }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { super.afterTestsStopped(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 10); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 4); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 4); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 4); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 4); }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { GridTestUtils.setFieldValue(null, TxDeadlockDetection.class, "DEADLOCK_TIMEOUT", getInteger(IGNITE_TX_DEADLOCK_DETECTION_TIMEOUT, 60000)); }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { super.afterTestsStopped(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 10); }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { super.afterTestsStopped(); GridTestUtils.setFieldValue(User.class, "bCryptGensaltLog2Rounds", 10); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); GridTestUtils.setFieldValue(null, TxDeadlockDetection.class, "DEADLOCK_TIMEOUT", (int)(getTestTimeout() * 2)); }
/** * @param store Store. * @throws Exception If failed. */ protected void inject(T store) throws Exception { getTestResources().inject(store); GridTestUtils.setFieldValue(store, "ses", ses); }
/** * @param store Store. * @throws Exception If failed. */ @Override protected void inject(CacheJdbcPojoStore<Object, Object> store) throws Exception { getTestResources().inject(store); GridTestUtils.setFieldValue(store, CacheAbstractJdbcStore.class, "ses", ses); }
/** * Create planner for IGFS. * * @param igfs IGFS. * @return Planner. */ private static IgniteHadoopWeightedMapReducePlanner createPlanner(IgfsMock igfs) { IgniteHadoopWeightedMapReducePlanner planner = new IgniteHadoopWeightedMapReducePlanner(); IgfsIgniteMock ignite = new IgfsIgniteMock(null, igfs); GridTestUtils.setFieldValue(planner, HadoopAbstractMapReducePlanner.class, "ignite", ignite); return planner; }
/** * Set log. * * @param log Log. * @param server Ignite. */ private void setLogger(MockLogger log, Ignite server) { IgniteKernal server0 = (IgniteKernal)server; GridDiscoveryManager discovery = server0.context().discovery(); GridTestUtils.setFieldValue(discovery, GridManagerAdapter.class, "log", log); }
/** * @param igniteClient Ignite client. * @param skip Skip. */ private void skipRead(IgniteEx igniteClient, boolean skip) { GridIoManager ioMgr = igniteClient.context().io(); TcpCommunicationSpi commSpi = (TcpCommunicationSpi)((Object[])U.field(ioMgr, "spis"))[0]; GridNioServer nioSrvr = U.field(commSpi, "nioSrvr"); GridTestUtils.setFieldValue(nioSrvr, "skipRead", skip); } }
/** * @throws IOException On error. */ @Test public void testDistribution() throws IOException { AffinityFunction aff0 = new RendezvousAffinityFunction(true, 1024); AffinityFunction aff1 = new RendezvousAffinityFunctionOld(true, 1024); GridTestUtils.setFieldValue(aff1, "ignite", ignite); affinityDistribution(aff0, aff1); }
/** * */ @Test public void testAffinityBenchmarkAdd() { mode = TopologyModificationMode.ADD; AffinityFunction aff0 = new RendezvousAffinityFunctionOld(true, 1024); GridTestUtils.setFieldValue(aff0, "ignite", ignite); affinityBenchmark(aff0, new RendezvousAffinityFunction(true, 1024)); }
/** * */ @Test public void testAffinityCompatibility() { AffinityFunction aff0 = new RendezvousAffinityFunction(true, 1024); // Use the full copy of the old implementation of the RendezvousAffinityFunction to check the compatibility. AffinityFunction aff1 = new RendezvousAffinityFunctionOld(true, 1024); GridTestUtils.setFieldValue(aff1, "ignite", ignite); structuralCompatibility(aff0, aff1); }
/** */ private IgniteEx startGridWithLogCapture() throws Exception { IgniteEx ignite = startGrid(0); this.capture = new GridStringLogger(false, this.log); GridTestUtils.setFieldValue(ignite.context().query(), GridProcessorAdapter.class,"log", capture); return ignite; }
/** * */ @Test public void testAffinityBenchmarkChangeLast() { mode = TopologyModificationMode.CHANGE_LAST_NODE; AffinityFunction aff0 = new RendezvousAffinityFunctionOld(true, 1024); GridTestUtils.setFieldValue(aff0, "ignite", ignite); affinityBenchmark(aff0, new RendezvousAffinityFunction(true, 1024)); }