Advertisement
malmike

OpenMRS ModuleInstall Test Error

Dec 18th, 2017
121
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.00 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-18 14:59:46,085| Logging an attempt to connect to: https://dl.bintray.com/openmrs/omod/xforms-4.3.11.omod
  6. Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 54.933 sec <<< FAILURE!
  7. shouldLoadModule(org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test) Time elapsed: 53.772 sec <<< ERROR!
  8. org.mockito.exceptions.misusing.MissingMethodInvocationException:
  9. when() requires an argument which has to be 'a method call on a mock'.
  10. For example:
  11. when(mock.getArticles()).thenReturn(articles);
  12.  
  13. Also, this error might show up because:
  14. 1. you stub either of: final/private/equals()/hashCode() methods.
  15. Those methods *cannot* be stubbed/verified.
  16. 2. inside when() you don't call method on mock but on some other object.
  17. 3. the parent of the mocked class is not public.
  18. It is a limitation of the mock engine.
  19.  
  20. at org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test.shouldLoadModule(ModuleInstallResource1_8Test.java:60)
  21. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  22. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  23. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  24. at java.lang.reflect.Method.invoke(Method.java:498)
  25. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
  26. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  27. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
  28. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  29. at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  30. at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
  31. at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  32. at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
  33. at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
  34. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
  35. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  36. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  37. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  38. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  39. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  40. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  41. at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
  42. at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  43. at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
  44. at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  45. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
  46. at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
  47. at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
  48. at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
  49. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  50. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  51. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  52. at java.lang.reflect.Method.invoke(Method.java:498)
  53. at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
  54. at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
  55. at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
  56. at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
  57. at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
  58.  
  59.  
  60. Results :
  61.  
  62. Tests in error:
  63. shouldLoadModule(org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.ModuleInstallResource1_8Test): (..)
  64.  
  65. Tests run: 5, Failures: 0, Errors: 1, Skipped: 0
  66.  
  67. [INFO] ------------------------------------------------------------------------
  68. [INFO] BUILD FAILURE
  69. [INFO] ------------------------------------------------------------------------
  70. [INFO] Total time: 01:07 min
  71. [INFO] Finished at: 2017-12-18T15:00:17+03:00
  72. [INFO] Final Memory: 34M/270M
  73. [INFO] ------------------------------------------------------------------------
  74. [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.
  75. [ERROR]
  76. [ERROR] Please refer to /Users/malmike/Projects/Apprentiship/openmrs-module-webservices.rest/omod-1.8/target/surefire-reports for the individual test results.
  77. [ERROR] -> [Help 1]
  78. [ERROR]
  79. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  80. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  81. [ERROR]
  82. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  83. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Advertisement
RAW Paste Data Copied
Advertisement