Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wsmaster/che-core-api-workspace sometimes fails to compile #3337

Closed
aleksei-burlakov opened this issue Dec 9, 2016 · 3 comments
Closed

wsmaster/che-core-api-workspace sometimes fails to compile #3337

aleksei-burlakov opened this issue Dec 9, 2016 · 3 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@aleksei-burlakov
Copy link

wsmaster/che-core-api-workspace sometimes failes to compile. I could observe this behaviour on commits:

commit ad718fd
commit d15915c
commit 349be48

Reproduction Steps:

  1. git clone https://github.com/eclipse/che.git
  2. cd che/wsmaster/che-core-api-workspace
  3. mvn clean compile

Expected behavior:

BUILD SUCCESS

Observed behavior:

sometimes BUILD SUCCESS, sometimes BUILD FAILURE

Tests run: 453, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 21.473 sec <<< FAILURE! - in TestSuite
performAsyncStartShouldUseProvidedEnvInsteadOfDefault(org.eclipse.che.api.workspace.server.WorkspaceManagerTest)  Time elapsed: 0.046 sec  <<< FAILURE!
org.mockito.exceptions.base.MockitoException: 
'stop' is a *void method* and it *cannot* be stubbed with a *return value*!
Voids are usually stubbed with Throwables:
    doThrow(exception).when(mock).someVoidMethod();
***
If you're unsure why you're getting above error read on.
Due to the nature of the syntax above problem might occur because:
1. The method you are trying to stub is *overloaded*. Make sure you are calling the right overloaded version.
2. Somewhere in your test you are stubbing *final methods*. Sorry, Mockito does not verify/stub final methods.
3. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub spies - 
   - with doReturn|Throw() family of methods. More in javadocs for Mockito.spy() method.

	at org.eclipse.che.api.workspace.server.WorkspaceManagerTest.performAsyncStartShouldUseProvidedEnvInsteadOfDefault(WorkspaceManagerTest.java:477)


Results :

Failed tests: 
  WorkspaceManagerTest.performAsyncStartShouldUseProvidedEnvInsteadOfDefault:477 Mockito

Tests run: 453, Failures: 1, Errors: 0, Skipped: 0

Che version: latest
OS and version: Ubuntu 16.04 LTE

  • Problem started happening recently, didn't happen in an older version of Che: Yes
  • Problem can be reliably reproduced, doesn't happen randomly: No
@voievodin
Copy link
Contributor

Hi @aleksei-burakov, thank you for the report.

I will collect the information from CI to figure out whether it happened before,
also I will try to reproduce it locally. Please make sure you don't have additional maven settings which are applied on build by default so the build becomes parallel, let's say in ~/.m2/settings.xml.
Can you please also provide the version of maven you're using mvn --version?

@voievodin voievodin added the kind/question Questions that haven't been identified as being feature requests or bugs. label Dec 9, 2016
@aleksei-burlakov
Copy link
Author

Hi @evoevodin

~/.m2/settings.xml doesn't exist.

$ mvn --version   
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-53-generic", arch: "amd64", family: "unix"

@aleksei-burlakov
Copy link
Author

I did not notice the error in the latest versions of che, so the issue might be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

2 participants