BaseModuleContextSensitiveTest Tests Fail:

Tags: #<Tag:0x00007f0f1c5175c0> #<Tag:0x00007f0f1c517390> #<Tag:0x00007f0f1c517160>

Test that extends BaseModuleContextSensitiveTest fails consitently with below error. Including serialization, xstream dependency does not solve the problem. Unable to determine the exact cause of the error.

Here is the full stacktrace: PAST BIN LOGS

[org/openmrs/module/serialization/xstream/converter/BaseShortConverter.class] cannot be opened because it does not exist

@samprogramiz you can share your draft pr here to

1 Like

@gcliff am running tests on a module that depends on reporting-api 1.16.0

@samprogramiz you can add this dependency if you dont have it in your pom file

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>serialization.xstream-api-2.0</artifactId>
  <version>${serialization.xstreamVersion}</version>
  <scope>test</scope>
</dependency>
1 Like

@samprogramiz it so much looks that a dependency issue,on adding the dependency make sure that the artifacts are downloaded properly

1 Like

I actually already have xstream in my pom but .m2 only contains the .pom files under seems to be missing the jar files.

@herbert24, the jar files specifically XStream are not downloaded when I build my module or even just by building reporting-module. I am looking into cloning and building xstream but I don’t see how this will work in a CI environment.

Is this a module that is available on github?

Yes I experience these errors while running tests that extend the BaseModuleContextSensitiveTest class for openmrs-module-muzimacore : https://github.com/muzima/openmrs-module-muzimacore - on the master branch which depends on reporting-api-1.16

Do you have a draft pull request that reproduces the problem?

1 Like

You should be able to see the errors if you build the code from the master-branch and run mvn-test

Add these dependencies to the pom.xml file of your api: https://pastebin.com/n8RYkg92

Also increase the version of your serialization.xstream-api to 0.2.7

2 Likes

Thanks @dkayiwa worked like charm!

1 Like