Providing a JUnit assume for the TestServerAndClient#testClientTermination test which currently fails on OS X with JDK 1.8 due to a JVM bug.

This commit is contained in:
Aldrin Piri 2015-04-23 13:16:17 -04:00
parent a53cc3d707
commit 0ecc6414df
1 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,7 @@
*/
package org.apache.nifi.distributed.cache.server;
import org.apache.commons.lang3.SystemUtils;
import org.apache.nifi.distributed.cache.server.DistributedSetCacheServer;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@ -44,6 +45,7 @@ import org.apache.nifi.util.MockConfigurationContext;
import org.apache.nifi.util.MockControllerServiceInitializationContext;
import org.apache.commons.lang3.SerializationException;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
@ -370,6 +372,14 @@ public class TestServerAndClient {
@Test
public void testClientTermination() throws InitializationException, IOException, InterruptedException {
/**
* This bypasses the test for build environments in OS X running Java 1.8 due to a JVM bug
* See: https://issues.apache.org/jira/browse/NIFI-437
*/
Assume.assumeFalse("testClientTermination is skipped due to build environment being OS X with JDK 1.8. See https://issues.apache.org/jira/browse/NIFI-437",
SystemUtils.IS_OS_MAC && SystemUtils.IS_JAVA_1_8);
LOGGER.info("Testing " + Thread.currentThread().getStackTrace()[1].getMethodName());
// Create server
final DistributedMapCacheServer server = new DistributedMapCacheServer();