yes @mozzy am getting the same problem after running; but when j tried to read into the error log .j think the problem could be in syncConfigurationUtilTest.java class.
Actually org.junit.ComparisonFailure: expected:<[expected]> but was:<[{ "general" : { "parentFeedLocation" : "", "localFeedLocation" : "defaultAddress", "localInstanceId" : "localInstanceId", "persistSuccessAudit" : false, "persistFailureAudit" : false, "clients" : { } }, "push" : { "enabled" : true, "schedule" : 12, "classes" : [ { "classTitle" : "Location", "category" : "location", "openMrsClass" : "org.openmrs.Location", "enabled" : true, "preferredClient" : "fhir" }, { "classTitle" : "Observation", "category" : "observation", "openMrsClass" : "org.openmrs.Obs", "enabled" : true, "preferredClient" : null } ] }, "pull" : { "enabled" : true, "schedule" : 12, "classes" : [ { "classTitle" : "Location", "category" : "location", "openMrsClass" : "org.openmrs.Location", "enabled" : true, "preferredClient" : "fhir" }, { "classTitle" : "Observation", "category" : "observation", "openMrsClass" : "org.openmrs.Obs", "enabled" : true, "preferredClient" : null } ] }, "whitelist" : { "enabled" : true, "instanceIds" : [ "childInstanceId" ] } } ]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at org.openmrs.module.sync2.api.utils.SyncConfigurationUtilsTest.shouldWriteSyncConfigurationToJsonString(SyncConfigurationUtilsTest.java:93) 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.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) 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.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
after running that class in test format , it returned the same json values but j guess we need to specify the path the url it need to return. @mozzy can you check into it especially line 93 from syncConfigurationTest. thanks
Theres some thing strange with travis config file for sync2 module. How is Travis able to run tests for Sync2 without any command for running tests included in the script? cc @dkayiwa@ssmusoke
in the Build log i can see The command "mvn test -B" exited with 0.
Could the failure be caused because the tests are run in isolation on a local machine but pass in the travis build when they are run in a certain order.??
@tendomart not yet I run the first instance using the SDK and it build successfully but the second instance failed while using the standalone. here is the error
@mozzy I first run the first instance using the SDK, after which I tried install the sync2 module, it asked for the atom feed module which I also installed , though the atom feed failed to install throwing this error
Error while trying to start moduleUnable to update data model using liquibase.xml. Module: Atomfeed module
The second instance I tried building with the standalone failed before I installed the Sync2 module. In other works it did not build to completion.
From the error log, i think the issue is about the database connection, I think both instances are trying to connect to one database which is causing the error.
ya as long as one instance is connected , the other one cant connect.
the default databse connection url is
connection.url=jdbc:mysql:mxj://127.0.0.1:3316/openmrs
you need to change the database conection url in the runtime properties for the second instance
to
connection.url=jdbc:mysql:mxj://127.0.0.1:3317/openmrs
In other words for you to have two instances runing,they must have different tomcat port and different Mysql port numbers