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

[SUREFIRE-1194] reporter argument does not work for TestNG #107

Closed
wants to merge 1 commit into from

Conversation

juherr
Copy link
Contributor

@juherr juherr commented Nov 20, 2015

No description provided.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 20, 2015

@juherr
I will run the build and i will check the code. Thx for the effort.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 22, 2015

@juherr the build is successful, I will check the changes.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 26, 2015

@juherr Can you add an integration test. I guess there is another API for reporter so that maybe we are missing one of them in our integration tests (testng 6.0).

@juherr
Copy link
Contributor Author

juherr commented Nov 26, 2015

@Tibor17 I tried to add some test cases in TestNgListenerReporter but I don't know how to override the testng version used by the test. Currently, it is defined by a system property into SurefireLauncher.

Do you think I can add a method into SurefireLauncher that will change testNgVersion?

Or maybe you can point me a test that already try different testng versions?

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 26, 2015

You can override the TestNG version by resetInitialGoals( version ) method and you can see the usage of the method in CheckTestNgVersionsIT. The version is passed to the pom.xml in the IT via system property "testNgVersion". You can see it in folder "testNgVersion" because CheckTestNgVersionsIT extracts test project which appears in testng-simple. See https://github.com/apache/maven-surefire/tree/master/surefire-integration-tests/src/test/resources/testng-simple and see <version>${testNgVersion}</version> which is the system property key.
See unpack( "testng-simple" ).

I think you can extend the test CheckTestNgListenerReporterIT with new test method using TestNG 6.0. See the IT project extracted by unpack( "testng-listener-reporter" ).

@juherr
Copy link
Contributor Author

juherr commented Nov 26, 2015

Thank! I missed resetInitialGoals( version ) before.

@juherr
Copy link
Contributor Author

juherr commented Nov 27, 2015

Current status:

Tests in error: 
  testNgListenerReporter[3: TestNG 5.13](org.apache.maven.surefire.its.CheckTestNgListenerReporterIT): Exit code was non-zero: 1; command line and log = (..)
  testNgListenerReporter[4: TestNG 5.14.2](org.apache.maven.surefire.its.CheckTestNgListenerReporterIT): Exit code was non-zero: 1; command line and log = (..)
  testNgListenerReporter[5: TestNG 5.14.3](org.apache.maven.surefire.its.CheckTestNgListenerReporterIT): Exit code was non-zero: 1; command line and log = (..)

Due to:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20-SNAPSHOT:test (default-test) on project testng-listener-reporter: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20-SNAPSHOT:test failed: There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:83)
[ERROR] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:134)
[ERROR] at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:118)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:152)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:286)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:240)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
[ERROR] Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[ERROR] ... 7 more
[ERROR] -> [Help 1]

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 27, 2015

Alright I go it. You must use profile instead:
.addGoal( "-P testng6" ) and the profile <id>testng6</id> should have dependencies with testng 6.0.
This way you activate profile in test method.

@juherr
Copy link
Contributor Author

juherr commented Nov 27, 2015

I'm not sure to understand.
The test with TestNG 6.0 and 6.9.9 is working, right?

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 27, 2015

6.9.9 works in my dummy project, then yes. Latest greatest.
Feel free to override the last commit.

On Fri, Nov 27, 2015 at 8:10 PM, Julien Herr notifications@github.com
wrote:

I'm not sure to understand.
The test with TestNG 6.0 and 6.9.9 is working, right?


Reply to this email directly or view it on GitHub
#107 (comment)
.

Cheers
Tibor

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 27, 2015

@juherr Try to commit what you have and I will check it out. Overriding last commit is just fine.

@juherr
Copy link
Contributor Author

juherr commented Nov 28, 2015

Some artifacts was corrupted before. Now, they are the same than central.

For 5.14.3:

[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

But I don't see what's wrong with the pom but it explains the NoClassDefFound.

For 5.14.2:

Cannot load class from file: listenReport.ResultListener listenReport.SuiteListener
at org.testng.internal.ClassHelper.fileToClass(ClassHelper.java:464)
at org.testng.TestNG.configure(TestNG.java:1182)
at org.testng.TestNG.configure(TestNG.java:1341)
at org.apache.maven.surefire.testng.conf.TestNGMapConfigurator.configure(TestNGMapConfigurator.java:52)

For 5.13:

java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.testng.TestNG.configure(TestNG.java:1370)
at org.apache.maven.surefire.testng.conf.TestNGMapConfigurator.configure(TestNGMapConfigurator.java:52)

@juherr
Copy link
Contributor Author

juherr commented Nov 28, 2015

I got it for 5.13 and 5.14.2: like reporter, listener attribute has changed too.
I will fix it asap.

I'm open for help with 5.14.3

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 29, 2015

Your IT has this POM
https://github.com/apache/maven-surefire/blob/master/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml
Did you know it?
There is property testNgVersion and specific surefire config with listeners.
Therefore you should create profile with another surefire config in each. One profile should be default (activeByDefault) for the old tests.
You can switch on exceptions and debug mode .addGoal( "-e -X" ) in the IT and then see the log.txt in surefire-integration-tests\target\CheckTestNgListenerReporterIT_TestNgListenerReporter\.

@juherr
Copy link
Contributor Author

juherr commented Nov 29, 2015

As you proposed before resetInitialGoals( version ) seems to work as expected. I'm not sure more profiles will help here.
I'm trying addGoal( "-e -X" ).

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 29, 2015

It's hard to debug the IT because @after cleaned up previous tests in target.
Good inspiration is Surefire1158RemoveInfoLinesIT and method unpack because the folder where the IT is extracted is not cleaned up but every @parameterized value combination has own postfix _xyz in folder name. Example:
return unpack( getClass(), "/surefire-1158-remove-info-lines", "_" + description, cli )
CLI is not your case.
Then we will see all logs from all tests which is good for debugging of entire build.
Not sure why you have such exception, but we will see the root cause if you call unpack as above and I guess the root cause is in missing classes in TestNG because the Reporter API changed in TestNG as I understood. This means we will need to have another configuration of

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
        <configuration>
          <properties>
            <property><name>usedefaultlisteners</name><value>false</value></property>
            <property><name>listener</name><value>listenReport.ResultListener,listenReport.SuiteListener</value></property>
            <property><name>reporter</name><value>listenReport.Reporter</value></property>
          </properties>
        </configuration>
      </plugin>

This means you can parameterize <value/> with Maven property been fetched from IT in the form of system property, e.g. <value>${it.listener}</value> and IT would have unpack(...).sysProp( "it.listener", "<class>" ); Or you can use Maven profile, as you like, but system property is okay and simple.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 29, 2015

@juherr Please mention the configuration of reported in surefire documentation.
I guess the returned value from convertReporterConfig() method should be different depending on TestNG Version. WDYT?

@juherr
Copy link
Contributor Author

juherr commented Nov 29, 2015

[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.testng:testng:5.14.3
[ERROR] 'dependencies.dependency.systemPath' for org.testng:guice:jar must specify an absolute path but is ${basedir}/lib-supplied/guice-2.0.jar @

http://search.maven.org/#artifactdetails%7Corg.testng%7Ctestng%7C5.14.3%7Cjar

   <dependency>
      <groupId>org.testng</groupId>
      <artifactId>guice</artifactId>
      <version>2.0</version>
      <scope>system</scope>
      <systemPath>${basedir}/lib-supplied/guice-2.0.jar</systemPath>
    </dependency>

Any idea how to fix it or should we consider 5.14.3 as broken?
5.14.4 and 5.14.5 have a similar problem due to the org.testng:guice dependency which doesn't exist on central.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 29, 2015

We can add system-dependency to the pom.xml of IT and add guice-2.0.jar on
the same level with pom.xml of the IT in the file system. You can extract
the jar from this zip
https://github.com/google/guice/wiki/Guice20
I hope it is the one we need, but you can of course ask Cedric how the
users use to struggle with this problem.

On Sun, Nov 29, 2015 at 5:03 PM, Julien Herr notifications@github.com
wrote:

[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive
dependencies (if any) will not be available: 1 problem was encountered
while building the effective model for org.testng:testng:5.14.3
[ERROR] 'dependencies.dependency.systemPath' for org.testng:guice:jar must
specify an absolute path but is ${basedir}/lib-supplied/guice-2.0.jar @

http://search.maven.org/#artifactdetails%7Corg.testng%7Ctestng%7C5.14.3%7Cjar

org.testng guice 2.0 system ${basedir}/lib-supplied/guice-2.0.jar

Any idea how to fix it or should we consider 7.14.3 as broken?
7.14.4 and 7.14.5 have a similar problem due to the org.testng:guice
dependency which doesn't exist on central.


Reply to this email directly or view it on GitHub
#107 (comment)
.

Cheers
Tibor

@juherr
Copy link
Contributor Author

juherr commented Nov 29, 2015

Current status:

5.14.3

The jar is still available:
https://github.com/cbeust/testng/blob/master/lib-supplied/guice-2.0.jar
It's a shaded jar of Guice 2.0 with custom package. Its usage was removed in 5.14.6 with testng-team/testng@331ab52

We can add system-dependency to the pom.xml of IT
I think the pom will still be wrong for 5.14.3 and maven will ignore transitive dependencies.

It could work for 5.14.4 and 5.14.5, but the 5.14.4 test seems to work without this jar.

you can of course ask Cedric how the users use to struggle with this problem.

I supposed they don't: 5.14.6 and later replaced previous 5.14.x, and there is no more support on so old versions.
But maybe @cbeust can tell us the story of this shaded jar :)

5.13 & 5.14.2

Fun part for the listener attribute:

  • Before -> ?
  • 5.12.1 -> List
  • 5.13 / 5.13.1 / 5.14 -> String
  • 5.14.1 / 5.14.2 -> List
  • 5.14.3 until now -> Both (String or List) is possible

But, even fixed, there is an issue in TestNG with listener:
Join on <space> -> https://github.com/cbeust/testng/blob/testng-5.14.2/src/main/java/org/testng/TestNG.java#L1313
And split on , or ; -> https://github.com/cbeust/testng/blob/testng-5.14.2/src/main/java/org/testng/TestNG.java#L1178
Fixed with 5.14.3

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 29, 2015

@juherr
Excellent!
Do you need any help from my side?

@juherr
Copy link
Contributor Author

juherr commented Nov 29, 2015

Do you need any help from my side?

Yes, decide something :)
Currently, the 5.14.2 and 5.14.3 tests are disable because of TestNG issues. 5.14.1 is failing too for the same reason.

I see 2 options:

  • Find a hack and pass the tests => I need help in this case
  • Block these versions in surefire (throwing an exception with the range [5.14.1,5.14.3])

@juherr
Copy link
Contributor Author

juherr commented Nov 29, 2015

In fact, configure(CommandLineArgs) may help to fix 5.14.1 and 5.14.2.
But it will be more work and time.

@Tibor17
Copy link
Contributor

Tibor17 commented Nov 29, 2015

Let me see tomorrow or on Tuesday.
You did a lot today 👍 but It's time to sleep.
Good progress. Thx.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 2, 2015

@juherr
IIUC testng 5.14.1 - 5.14.3 are buggy and can be excluded from the test set.
What exactly the bug is? You mean the ClassLoader issue? What did you mean with the fix in configure(CommandLineArgs)? I think we should mention it in surefire documentation and user can freely rely on the latest 5.14.9. Can you include 5.14.9 in the IT?
We are updating the documentation (your repo):
https://github.com/juherr/maven-surefire/tree/2b509471f4a364985860084e63bd0f6b659840fc/maven-surefire-plugin/src/site

@juherr
Copy link
Contributor Author

juherr commented Dec 3, 2015

What exactly the bug is?

configure(Map) from 5.14.1 and 5.14.2 is transforming List<Class> into a String with a space as separator. Then, configure(CommandLineArgs) is spliting this String into a List<String> with , or ; as separator => fail.
If we use configure(CommandLineArgs), we won't have the space problem.

Should failsafe fail with bad version, at least 5.14.3 which can't work at all? I think it should.

Can you include 5.14.9 in the IT?

Ok, I will.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 3, 2015

@juherr What about to replace "," with ", " in surefire parameter value in TestNG provider.
Maybe Configurator for 5.14.1 - 5.14.2 would properly come over that issue.
Do you think this would come over the issue and would work in 6.x as well?
I guess configure(CommandLineArgs) is more work WDYT?

@juherr
Copy link
Contributor Author

juherr commented Dec 3, 2015

What about to replace "," with ", " in surefire parameter

It won't work because TestNG need a `List in these 2 versions.

I guess configure(CommandLineArgs) is more work WDYT?

For sure, and I have no idea how much it will cost. For example, I didn't check, if we use a recent version, if CommandLineArgs is backward compatible :(

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 6, 2015

@juherr I updated the comment. I don't mean this weekend. We still have one week left.

@juherr
Copy link
Contributor Author

juherr commented Dec 8, 2015

@Tibor17 Done. Are the commits ok for you, or do you want I try to squash and/or reword them?

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 8, 2015

Thx, try to squash them.

On Tue, Dec 8, 2015 at 11:21 AM, Julien Herr notifications@github.com
wrote:

@Tibor17 https://github.com/Tibor17 Done. Are the commits ok for you,
or do you want I try to squash and/or reword them?


Reply to this email directly or view it on GitHub
#107 (comment)
.

Cheers
Tibor

… later

Improve tests
Change type for the reporter param
Run unit tests for TestNG

Typo in TestNG513ConfiguratorTest

Fix tests

Update documentation

Fail or warn with bad TestNG versions
@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

I was about to push your commit and start the release Vote.
Please run the ITs. I found a problem in IT
Tests in error:
testNgListenerReporter4: TestNG 5.14.4
java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
The exception class is really missing in JAR and TestNG and RemoteTestNG class are referencing the exception.

Do not hesitate to express the Warning and message in MojoExecutionException in AbstractSurefireMojo in detail, e.g. testng pom contains system scope artifact org.testng:guice:2.0. Other reason like you already mentioned in CheckTestNgListenerReporterIT comments.

According to the comment in your IT Version 5.14.5 is wrong? Treatment was to exclude guice artifact?

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

@juherr Are you a committer at TestNG project?

@cbeust
Copy link

cbeust commented Dec 13, 2015

@Tibor17 Yes, @juherr is a committer.

@juherr
Copy link
Contributor Author

juherr commented Dec 13, 2015

5.14.4 is not supposed to fail and excluding the bad dependency worked for me.
I'll try again with an up2date maven. Which one are you using?

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

@juherr I am running the build in command line.
This is the command I use mvn -P run-its install.
This means the build result should be same in your case as well.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

@cbeust
@juherr
I am thinking about asking and introducing @juherr committer in Maven ASF.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

@juherr @cbeust
Yeasterday I made big refactoring on TestNG provider. This is old project which started in Codehaus and the provider contained unused code, etc.

@juherr
Copy link
Contributor Author

juherr commented Dec 13, 2015

committer in Maven ASF

I'm open :)

Tests in error

I confirm it is working for me with maven 3.3.9 and 3.2.5.

-------------------------------------------------------------------------------
Test set: org.apache.maven.surefire.its.CheckTestNgListenerReporterIT
-------------------------------------------------------------------------------
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 41.239 sec

Global result: Tests run: 692, Failures: 0, Errors: 0, Skipped: 133

But we can avoid the problem and block 5.14.4 and 5.14.5 by default, like we did it with 5.14.3.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

@juherr Please try to test with official Version Maven 3.0.5 which should be used in Surefire project. I used 3.2.1. I will try with 3.0.5 as well and let you know my findings.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

I have reproduced the issue and the error is really true because the testng-5.14.4.jar really does not contain the class com/beust/jcommander/ParameterException.
Please extract your JAR file and you will see that the class is missing.
There are two Maven repositories where you can find such Maven artifact:

  1. Maven local repository
  2. surefire-setup-integration-tests/target/it-repo
    Sometimes it is useful to delete artifacts org/testng/testng from Maven local repository.
    Please make a clone of your GitHub as I did, launch tests as I did and you can then compare the sources (maybe something was not committed):
  3. $ mvn -V prints
    Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
    See environment variable M2_HOME.
  4. delete artifacts org/testng/testng from Maven local repository
  5. make the clone in folder SUREFIRE-1194
    $ git clone -b surefire-1194 https://github.com/juherr/maven-surefire.git SUREFIRE-1194
    $ cd SUREFIRE-1194
  6. edit surefire-integration-tests/pom.xml and replace *IT* with CheckTestNgListenerReporterIT.
  7. run $ mvn -P run-its install

@juherr
Copy link
Contributor Author

juherr commented Dec 13, 2015

com/beust/jcommander/ParameterException comes from jcommander which is a TestNG dependency. If it is missing, that means the dependency resolution is falling. Are you sure you don't have a corrupted artifact somewhere? I remember to have this problem sometimes before.

But I will try your process too.

@juherr
Copy link
Contributor Author

juherr commented Dec 13, 2015

I've just followed your process and it's working well for me with maven 3.0.5 and Oracle JDK 1.8.0_66 on Linux Mint 17.2 Rafaela.
The output is https://gist.github.com/juherr/72a115e310da9516ff51

I tried on 2 different computer too.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

I use Maven 3.3.9 like you use.

Do you have this path
surefire-integration-tests/target/CheckTestNgListenerReporterIT_testNgListenerReporter_5.14.4?

I use Java 7 which is maybe the only one difference.
I added .addGoal( "-X" ) in your IT class and TestNG 5.14.4 has dependencies with <scope>compile</scope> and the classpath in IT is
[DEBUG] boot(compact) classpath: surefire-booter-2.20-SNAPSHOT.jar surefire-api-2.20-SNAPSHOT.jar test-classes classes testng-5.14.4.jar surefire-testng-utils-2.20-SNAPSHOT.jar surefire-grouper-2.20-SNAPSHOT.jar surefire-testng-2.20-SNAPSHOT.jar common-java5-2.20-SNAPSHOT.jar

I think Surefire has dependency resolution issue.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

After deleting both repositories and using maven 3.3.9 still bad result in
surefire-integration-tests/target/CheckTestNgListenerReporterIT_testNgListenerReporter_5.14.4

@juherr
Copy link
Contributor Author

juherr commented Dec 13, 2015

Do you have this path?

Yes

I use Java 7 which is maybe the only one difference.

Ok. But it is working well on my side with openjdk 1.7.0_91.

I added .addGoal( "-X" )

With Java 7 and maven 3.0.5

[DEBUG] boot(compact) classpath:  surefire-booter-2.20-SNAPSHOT.jar  surefire-api-2.20-SNAPSHOT.jar  test-classes  classes  testng-5.14.4.jar  junit-3.8.1.jar  bsh-2.0b4.jar  jcommander-1.12.jar  surefire-testng-utils-2.20-SNAPSHOT.jar  surefire-grouper-2.20-SNAPSHOT.jar  surefire-testng-2.20-SNAPSHOT.jar  common-java5-2.20-SNAPSHOT.jar

Same result with Java 7 and maven 3.3.9.
I added the full log in https://gist.github.com/juherr/72a115e310da9516ff51

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

Did you delete both repositories?

  1. Maven local repository
  2. surefire-setup-integration-tests/target/it-repo

@juherr
Copy link
Contributor Author

juherr commented Dec 13, 2015

Yes.
I tried first by removing testng from local repo + full it-repo.
Then I tried by removing full local repo + full it-repo.
CheckTestNgListenerReporterIT worked in both cases.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 13, 2015

@agudian
Hi Andreas,
We have here different test result. Can you please launch CheckTestNgListenerReporterIT in your environment? You should make this clone
$ git clone -b surefire-1194 https://github.com/juherr/maven-surefire.git SUREFIRE-1194
My problem is that I do not have transitive dependencies from testng:5.14.4 and the IT fails.
@juherr does not have this issue.
Do you know why this happens?

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 14, 2015

@juherr
How did you solve #107 (comment) ?
It's the same problem with the exception I have now.

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 14, 2015

@juherr
Do you have this file on your file system?
/Users/cbeust/java/testng/target/checkout/lib-supplied/guice-2.0.jar
I guess you have it and that's the reason why we have different build result.
Somehow the Maven does not discover the dependencies after unresolved system dependency.
Although you excluded it in IT POM, the Maven failed anyway.
You tried to exclude it for testng:6.9.9 but that Version has classifier which means it was not really excluded.
The CI Jenkins will fail as well, so we must solve this last issue before pushing it to master.
What about to remove 5.14.4 in your IT? We should maybe add a comment "not able to test due to system dependency missed the path and use to break CI".
Can you please additionally remove this line private SurefireLauncher verifierStarter; ?

@Tibor17
Copy link
Contributor

Tibor17 commented Dec 15, 2015

@juherr
Pls close this issue. I made additional updates and pushed your commit to the master.
Thx for contributing.

@juherr
Copy link
Contributor Author

juherr commented Dec 15, 2015

@Tibor17 Ok. But I still don't understand why it is working on my computers: I don't have guice-2.0.jar and exclude it was enough.

For my information, why did you revert String -> Object?

@juherr juherr closed this Dec 15, 2015
@Tibor17
Copy link
Contributor

Tibor17 commented Dec 15, 2015

Ok. But I still don't understand why it is working on my computers: I don't have guice-2.0.jar and exclude it was enough.

Hm, that's strange but the important thing is that Jenkins CI did not fail the build and we continue straight ahead of the release of 1.9.1.

For my information, why did you revert String -> Object?

I changed that back because the underneath method uses Java Reflection API and does not have any restrictions regarding String - uses Object. Additionally did not need to call getValue() twice.

@juherr juherr deleted the surefire-1194 branch December 15, 2015 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants