I’ve checked out the RegistrationCore module 1.7.1 ( RegistrationCore-1.7.1 ), But the module fails tests while building. It’s a fresh copy and i haven’t made any changes. But this only happens in my machine. When i try to build the same in another machine it works fine.
Here’s the error i’m getting…
T E S T S
-------------------------------------------------------
Running org.openmrs.module.registrationcore.api.search.BasicExactPatientSearchAlgorithmTest
Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.386 sec <<< FAILURE!
shouldMatchOnExactMatch(org.openmrs.module.registrationcore.api.search.BasicExactPatientSearchAlgorithmTest) Time elapsed: 0.218 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is <1>
but: was <2>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at org.openmrs.module.registrationcore.api.search.BasicExactPatientSearchAlgorithmTest.shouldMatchOnExactMatch(BasicExactPatientSearchAlgorithmTest.java:52)
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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
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 org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Running org.openmrs.module.registrationcore.api.search.ExistingPatientNameSearchTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.308 sec
Running org.openmrs.module.registrationcore.api.search.BasicSimilarPatientSearchAlgorithmTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.021 sec
Running org.openmrs.module.registrationcore.api.search.BasicPatientNameSearchTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.27 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiPatientFetcherTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiPatientExporterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiAuthenticatorTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.061 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiPatientFilterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.PatientBuilderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.RestQueryExecutorTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.297 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.FindPatientQueryBuilderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiPatientSearchAlgorithmTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.069 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiConnectorTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.101 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiPatientUpdaterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.OpenEmpiPatientResultBuilderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running org.openmrs.module.registrationcore.api.mpi.openempi.PatientIdentifierMapperTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running org.openmrs.module.registrationcore.api.impl.PatientEditListenerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.002 sec
Running org.openmrs.module.registrationcore.api.impl.PatientCreationListenerTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.064 sec
Running org.openmrs.module.registrationcore.api.impl.IdentifierBuilderTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.178 sec
Running org.openmrs.module.registrationcore.api.RegistrationCoreServiceTest
ERROR - ActiveMQMessageConsumer.dispatch(1233) |2017-08-10 17:05:41,121| ID:nipun-ThinkPad-X1-Carbon-5th-33395-1502364935256-2:1:1:1 Exception while processing message: ID:nipun-ThinkPad-X1-Carbon-5th-33395-1502364935256-2:1:3:1:1
org.openmrs.api.context.ContextAuthenticationException: Invalid token null
at org.openmrs.api.context.Daemon.runInDaemonThread(Daemon.java:245)
at org.openmrs.module.registrationcore.api.impl.PatientActionListener.onMessage(PatientActionListener.java:40)
at org.openmrs.event.EventEngine$3.onMessage(EventEngine.java:222)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1229)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
ERROR - ActiveMQMessageConsumer.dispatch(1233) |2017-08-10 17:05:42,130| ID:nipun-ThinkPad-X1-Carbon-5th-33395-1502364935256-2:1:1:1 Exception while processing message: ID:nipun-ThinkPad-X1-Carbon-5th-33395-1502364935256-2:1:3:1:1
org.openmrs.api.context.ContextAuthenticationException: Invalid token null
at org.openmrs.api.context.Daemon.runInDaemonThread(Daemon.java:245)
at org.openmrs.module.registrationcore.api.impl.PatientActionListener.onMessage(PatientActionListener.java:40)
at org.openmrs.event.EventEngine$3.onMessage(EventEngine.java:222)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1229)
at org.apache.activemq.ActiveMQMessageConsumer.iterate(ActiveMQMessageConsumer.java:1362)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:194)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.429 sec
Running org.openmrs.module.registrationcore.RegistrationCoreUtilTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec
Results :
Failed tests: shouldMatchOnExactMatch(org.openmrs.module.registrationcore.api.search.BasicExactPatientSearchAlgorithmTest): (..)
Tests run: 76, Failures: 1, Errors: 0, Skipped: 5
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Registration Core Module ........................... SUCCESS [ 0.181 s]
[INFO] Registration Core Module API ....................... FAILURE [ 16.163 s]
[INFO] Registration Core Module OMOD ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.648 s
[INFO] Finished at: 2017-08-10T17:05:43+05:30
[INFO] Final Memory: 29M/304M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project registrationcore-api: There are test failures.
[ERROR]
[ERROR] Please refer to /media/repos/gsoc/regCoreTests/openmrs-module-registrationcore/api/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :registrationcore-api