Refine search
@Test public void testReflectionHierarchyArrayList() { // note, the test data depends on the internal representation of the ArrayList, which may differ between JDK versions and vendors // representation different for IBM JDK 1.6.0, LANG-727 assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION)); assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION) < 0); // LANG-1337 without this, the generated string can differ depending on the JVM version/vendor final List<Object> list = new ArrayList<>(ARRAYLIST_INITIAL_CAPACITY); final String baseString = this.toBaseString(list); final String expectedWithTransients = baseString + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]"; final String toStringWithTransients = ToStringBuilder.reflectionToString(list, null, true); if (!expectedWithTransients.equals(toStringWithTransients)) { assertEquals(expectedWithTransients, toStringWithTransients); } final String expectedWithoutTransients = baseString + "[size=0]"; final String toStringWithoutTransients = ToStringBuilder.reflectionToString(list, null, false); if (!expectedWithoutTransients.equals(toStringWithoutTransients)) { assertEquals(expectedWithoutTransients, toStringWithoutTransients); } }
@Test public void shouldThrowWhenRelativePathIsOutsideImportDirectory() throws Exception { assumeFalse( Paths.get( "/" ).relativize( Paths.get( "/../baz.csv" ) ).toString().equals( "baz.csv" ) ); File importDir = new File( "/tmp/neo4jtest" ).getAbsoluteFile(); final Config config = Config.defaults( GraphDatabaseSettings.load_csv_file_url_root, importDir.toString() ); try { URLAccessRules.fileAccess().validate( config, new URL( "file:///../baz.csv" ) ); fail( "expected exception not thrown " ); } catch ( URLAccessValidationError error ) { assertThat( error.getMessage(), equalTo( "file URL points outside configured import directory" ) ); } }
@Test public void testReadXmlWithBOMUcs2() throws Exception { Assume.assumeFalse("This test does not pass on some IBM VMs xml parsers", System.getProperty("java.vendor").contains("IBM")); // UCS-2 is BE. Assume.assumeTrue(Charset.isSupported("ISO-10646-UCS-2")); final byte[] data = "<?xml version=\"1.0\" encoding=\"ISO-10646-UCS-2\"?><X/>".getBytes("ISO-10646-UCS-2"); parseXml(new BOMInputStream(createUtf16BeDataStream(data, true), ByteOrderMark.UTF_16BE)); parseXml(createUtf16BeDataStream(data, true)); }
/** * @throws Exception If failed. */ @Test public void testJoinWhileActivate1_WithCache_Server() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); joinWhileActivate1(false, true); }
/** * @throws Exception If failed. */ @Test public void testJmxNoPdsStatisticsEnable() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-9224", MvccFeatureChecker.forcedMvcc()); testJmxStatisticsEnable(false); }
/** * @throws Exception If failed. */ @Test public void testDisabledPreloadRestart() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10261", MvccFeatureChecker.forcedMvcc()); preloadMode = NONE; checkRestart(); }
/** * Test simple node join. * * @throws Exception If failed. */ @Test public void testJoin() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); checkJoin(false); }
/** * @throws Exception If failed. */ @Test public void testWalNotDisabledIfParameterSetToFalse() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); disableWalDuringRebalancing = false; doTestSimple(); }
/** * @throws Exception If failed. */ @Test public void testWalDisabledDuringRebalancing() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); doTestSimple(); }
/** * @throws Exception If failed. */ @Test public void testParallelExchangeDuringCheckpoint() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); doTestParallelExchange(fileIOLatch); }
/** * @throws Exception If failed. */ @Test public void testPutGetNone1() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10261", MvccFeatureChecker.forcedMvcc()); preloadMode = NONE; backups = 1; performTest(); }
/** * */ @Test public void testEnlistManyWriteOptimistic() throws Exception { Assume.assumeFalse(MvccFeatureChecker.forcedMvcc()); // Optimistic transactions are not supported by MVCC. testEnlistMany(true, SERIALIZABLE, OPTIMISTIC); }
/** * @throws Exception If failed. */ @Test public void testJoinWhileActivate1_Server() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); joinWhileActivate1(false, false); }
/** * Test if DELETE operation can be found for atomic cache after mixed cache operations including remove(). * * @throws Exception if failed. */ @Test public void testRemoveOperationPresentedForDataEntryForAtomic() throws Exception { Assume.assumeFalse(MvccFeatureChecker.forcedMvcc()); runRemoveOperationTest(CacheAtomicityMode.ATOMIC); }
/** * @throws Exception if failed. */ @Test public void testRebalancingDuringLoad_10_10_1_1() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10583", MvccFeatureChecker.forcedMvcc()); checkRebalancingDuringLoad(10, 10, 1, 1); }
/** * @throws Exception If failed. */ @Test public void testParallelExchangeDuringRebalance() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); doTestParallelExchange(supplyMessageLatch); }
/** * @throws Exception If failed. */ @Test public void testPutGetNone2() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10261", MvccFeatureChecker.forcedMvcc()); preloadMode = NONE; backups = 2; performTest(); }
/** * @throws Exception If failed. */ @Test public void testJmxPdsStatisticsEnable() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-10421", MvccFeatureChecker.forcedMvcc()); testJmxStatisticsEnable(true); }
/** * */ @Test public void testEnlistManyReadOptimistic() throws Exception { Assume.assumeFalse(MvccFeatureChecker.forcedMvcc()); // Optimistic transactions are not supported by MVCC. testEnlistMany(false, SERIALIZABLE, OPTIMISTIC); }
@Test public void testListenInvalidPort() throws Exception { /* Port 7 is free for use by any application in Windows, so this test fails. */ Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows")); server.close(); server = vertx.createHttpServer(new HttpServerOptions().setPort(7)); server.requestHandler(noOpHandler()).listen(onFailure(server -> testComplete())); await(); }