Advertisement
malmike

Use ModuleFactory to mock module

Dec 19th, 2017
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None
  1. -------------------------------------------------------
  2. T E S T S
  3. -------------------------------------------------------
  4. Running org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test
  5. ERROR - ModuleUtil.getURLStream(590) |2017-12-19 21:45:30,713| Logging an attempt to connect to: https://dl.bintray.com/openmrs/omod/xforms-4.3.11.omod
  6. Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 54.794 sec <<< FAILURE!
  7. shouldLoadModule(org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test) Time elapsed: 53.772 sec <<< FAILURE!
  8. java.lang.AssertionError:
  9. Expected: a collection containing <mockModule>
  10. but: was null
  11. at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
  12. at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
  13. at org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test.shouldLoadModule(ModuleInstallResource1_8Test.java:75)
  14. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  15. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  16. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  17. at java.lang.reflect.Method.invoke(Method.java:498)
  18. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
  19. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  20. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
  21. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  22. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  23. at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
  24. at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  25. at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
  26. at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
  27. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
  28. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  29. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  30. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  31. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  32. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  33. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  34. at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
  35. at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  36. at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
  37. at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  38. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
  39. at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
  40. at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
  41. at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
  42. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  43. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  44. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  45. at java.lang.reflect.Method.invoke(Method.java:498)
  46. at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
  47. at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
  48. at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
  49. at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
  50. at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
  51.  
  52.  
  53. Results :
  54.  
  55. Failed tests: shouldLoadModule(org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test): (..)
  56.  
  57. Tests run: 5, Failures: 1, Errors: 0, Skipped: 0
  58.  
  59. [INFO] ------------------------------------------------------------------------
  60. [INFO] BUILD FAILURE
  61. [INFO] ------------------------------------------------------------------------
  62. [INFO] Total time: 01:07 min
  63. [INFO] Finished at: 2017-12-19T21:46:02+03:00
  64. [INFO] Final Memory: 34M/271M
  65. [INFO] ------------------------------------------------------------------------
  66. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project webservices.rest-omod-1.8: There are test failures.
  67. [ERROR]
  68. [ERROR] Please refer to /Users/malmike/Projects/Apprentiship/openmrs-module-webservices.rest/omod-1.8/target/surefire-reports for the individual test results.
  69. [ERROR] -> [Help 1]
  70. [ERROR]
  71. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  72. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  73. [ERROR]
  74. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  75. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Advertisement
RAW Paste Data Copied
Advertisement