I've been trying to resolve an issue in an Elasticsearch plugin I maintain. This plugin builds fine for others in Ubuntu, but a fresh build in OS X is producing pretty inscrutable test failures.
To see if it was me, I brought down Elasticsearch source and ran gradle test
and indeed I've gotten the same errors, listed at the bottom. Only a couple of tests are failing, most pass. But some randomly fail.
Is this something known on OS X? Is there a workaround? Searching hasn't turned up anything (but my google-fu may be weak)
Exception thrown by subscriber method onHeartbeat(com.carrotsearch.ant.tasks.junit4.events.aggregated.HeartBeatEvent) on subscriber com.carrotsearch.gradle.junit4.TestReportLogger@52ca2fa9 when dispatching event: com.carrotsearch.ant.tasks.junit4.events.aggregated.HeartBeatEvent@3fa57c62
java.lang.NullPointerException
at com.carrotsearch.ant.tasks.junit4.ForkedJvmInfo.getPidString(ForkedJvmInfo.java:85)
at com.carrotsearch.ant.tasks.junit4.ForkedJvmInfo$getPidString.call(Unknown Source)
at com.carrotsearch.gradle.junit4.TestReportLogger.onHeartbeat(TestReportLogger.groovy:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:95)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:154)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber$1.run(Subscriber.java:80)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:456)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:76)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:119)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.EventBus.post(EventBus.java:215)
at com.carrotsearch.ant.tasks.junit4.events.aggregated.AggregatingListener.slowHeartBeat(AggregatingListener.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:95)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:154)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber$1.run(Subscriber.java:80)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:456)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:76)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:119)
at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.EventBus.post(EventBus.java:215)
at com.carrotsearch.ant.tasks.junit4.LocalSlaveStreamHandler$3.run(LocalSlaveStreamHandler.java:149)