/** * @return Entry Processor. */ protected String getEntryProcessor(){ return GridTestProperties.getProperty(GridTestProperties.ENTRY_PROCESSOR_CLASS_NAME) != null ? GridTestProperties.getProperty(GridTestProperties.ENTRY_PROCESSOR_CLASS_NAME) : "org.apache.ignite.tests.p2p.CacheDeploymentEntryProcessor"; }
/** * @return Time for load test in minutes. */ private int getTestDurationInMinutes() { return Integer.valueOf(GridTestProperties.getProperty("load.test.duration")); }
/** * @return Time for load test in minutes. */ private int getTestDurationInMinutes() { return Integer.valueOf(GridTestProperties.getProperty("load.test.duration")); }
/** * @return Time for load test in minutes. */ private int getTestDurationInMinutes() { return Integer.valueOf(GridTestProperties.getProperty("load.test.duration")); }
/** * @return Number of threads for the test. */ private int getThreadCount() { return Integer.valueOf(GridTestProperties.getProperty("load.test.threadnum")); }
/** * @return Number of threads for the test. */ private int getThreadCount() { return Integer.valueOf(GridTestProperties.getProperty("load.test.threadnum")); }
/** * @return Time for load test in minutes. */ private int getTestDurationInMinutes() { return Integer.valueOf(GridTestProperties.getProperty("load.test.duration")); }
/** * @return Number of nodes to start/stop. */ protected int getNodeCount() { return Integer.valueOf(GridTestProperties.getProperty("load.test.nodenum")); }
/** * @return Default test case timeout. */ private long getDefaultTestTimeout() { String timeout = GridTestProperties.getProperty("test.timeout"); if (timeout != null) return Long.parseLong(timeout); return GridTestUtils.DFLT_TEST_TIMEOUT; }
/** * @throws MalformedURLException If failed */ public UsersClassLoader() throws MalformedURLException { super(new URL[] {new URL(GridTestProperties.getProperty("p2p.uri.cls"))}); } }
/** * @return Time for load test in minutes. */ private int getTestDurationInMinutes() { return Integer.valueOf(GridTestProperties.getProperty("load.test.duration")); }
/** * @return Number of threads for the test. */ private int getThreadCount() { //return 1; return Integer.valueOf(GridTestProperties.getProperty("load.test.threadnum")); }
/** * @return Number of threads for the test. */ private int getThreadCount() { return Integer.valueOf(GridTestProperties.getProperty("load.test.threadnum")); }
/** * @return Number of threads for the test. */ private int getThreadCount() { return Integer.valueOf(GridTestProperties.getProperty("load.test.threadnum")); }
/** * @return Number of threads for the test. */ private int getThreadCount() { return Integer.valueOf(GridTestProperties.getProperty("load.test.threadnum")); }
/** * @return Loaded class. * @throws Exception Thrown if any exception occurs. */ private Class<? extends ComputeTask<int[], ?>> loadTaskClass() throws Exception { return (Class<? extends ComputeTask<int[], ?>>)new GridTestExternalClassLoader(new URL[]{ new URL(GridTestProperties.getProperty("p2p.uri.cls"))}).loadClass(TASK_NAME); } }
/** * @param ignite Ignite instance. * @param timeout Timeout. * @throws Exception If failed. */ private void runJob1(Ignite ignite, long timeout) throws Exception { ClassLoader testClassLoader1 = new GridTestExternalClassLoader(new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls"))}, RUN_CLS, RUN_CLS2); Constructor ctor = testClassLoader1.loadClass(RUN_CLS1).getConstructor(); ignite.compute().withTimeout(timeout).broadcast((IgniteCallable<?>)ctor.newInstance()); }
/** * @param ignite Ignite instance. * @param timeout Timeout. * @throws Exception If failed. */ private void runJob0(Ignite ignite, long timeout) throws Exception { ClassLoader testClassLoader = new GridTestExternalClassLoader(new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls"))}, RUN_CLS1, RUN_CLS2); Constructor ctor = testClassLoader.loadClass(RUN_CLS).getConstructor(); ignite.compute().withTimeout(timeout).broadcast((IgniteCallable<?>)ctor.newInstance()); }
/** * @param ignite Ignite instance. * @param timeout Timeout. * @throws Exception If failed. */ private void runJob2(Ignite ignite, long timeout) throws Exception { ClassLoader testClassLoader = new GridTestExternalClassLoader(new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls"))}, RUN_CLS, RUN_CLS1); Constructor ctor = testClassLoader.loadClass(RUN_CLS2).getConstructor(); ignite.compute().withTimeout(timeout).broadcast((IgniteCallable<?>)ctor.newInstance()); } }
/** * Creates test-purposed SSL context factory from test key store with disabled trust manager. * * @return SSL context factory used in test. */ public static Factory<SSLContext> sslFactory() { SslContextFactory factory = new SslContextFactory(); factory.setKeyStoreFilePath( U.resolveIgnitePath(GridTestProperties.getProperty("ssl.keystore.path")).getAbsolutePath()); factory.setKeyStorePassword(keyStorePassword().toCharArray()); factory.setTrustManagers(SslContextFactory.getDisabledTrustManager()); return factory; }