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

WW-4638 - TestNG 6.9.10 dependency error #98

Merged
merged 14 commits into from
Jul 18, 2016
Merged

WW-4638 - TestNG 6.9.10 dependency error #98

merged 14 commits into from
Jul 18, 2016

Conversation

victorsosa
Copy link
Contributor

Fix dependency issue and update to 1.7 jdk

victorsosa and others added 4 commits May 25, 2016 10:42
@lukaszlenart
Copy link
Member

I'm just wondering about those all merge commits, did you update your fork?

https://help.github.com/articles/syncing-a-fork/

@lukaszlenart
Copy link
Member

I've got such an error when building locally:
INFO] Struts 2 TestNG Plugin ............................. FAILURE [ 7.039 s]

org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.xml.XmlSuite.setParallel(Z)V; nested exception is java.lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V
java.lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:123)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)

@lukaszlenart
Copy link
Member

lukaszlenart commented Jun 7, 2016

And changing in plugins/testng/pom.xml is not enough, this dependency is used in few other places.

@victorsosa
Copy link
Contributor Author

On my end.

[INFO] Installing /home/vns/workspace/struts/plugins/testng/target/struts2-testng-plugin-2.5.1-SNAPSHOT-sources.jar to /home/vns/.m2/repository/org/apache/struts/struts2-testng-plugin/2.5.1-SNAPSHOT/struts2-testng-plugin-2.5.1-SNAPSHOT-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

also in the build was success: https://builds.apache.org/job/Struts-JDK7-pull-request/180/org.apache.struts$struts2-testng-plugin/

Yes, I updated the fork from master. Sorry about the update. the only file changed is the pom.xml.

@lukaszlenart
Copy link
Member

I'm using

java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

and you?

@lukaszlenart
Copy link
Member

and this is related to outdated version of org.apache.maven.plugins:maven-surefire-plugin:2.3.1

@victorsosa
Copy link
Contributor Author

openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

@victorsosa
Copy link
Contributor Author

Sorry I compiled the wrong branch, I was able to duplicate the issue

@lukaszlenart
Copy link
Member

Uf... I thought I'm betting crazy ;-)

@victorsosa
Copy link
Contributor Author

NOp :)

@victorsosa
Copy link
Contributor Author

Here is the fix:

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

Should we update the version in the main pom???

@lukaszlenart
Copy link
Member

Yes, please

@victorsosa
Copy link
Contributor Author

Maybe It is not a good idea because this test is failing and I don't have the clue about what is wrong. Do you know why?

Tests run: 1659, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 170.82 sec <<< FAILURE!
testTwoWait(org.apache.struts2.interceptor.ExecuteAndWaitInterceptorTest) Time elapsed: 0.865 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<[success]> but was:<[wait]>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at org.apache.struts2.interceptor.ExecuteAndWaitInterceptorTest.testTwoWait(ExecuteAndWaitInterceptorTest.java:92)

@lukaszlenart
Copy link
Member

test is too fast?

@victorsosa
Copy link
Contributor Author

Yep it was too fast; that fixed it.

@victorsosa
Copy link
Contributor Author

@lukaszlenart can you check please the result in jenkins because I am getting success build for Portlet here in my PC.

But here it gets

unexpected status code [500] at URL: [http://localhost:50757/test/pluto/index.jsp]

@lukaszlenart
Copy link
Member

It fails the same, I was trying many different things. I think we should move portlet-app away from Struts into Struts Examples (as other apps as well)

@cnenning
Copy link
Member

I think we should move portlet-app away from Struts into Struts Examples

Oh, yes! We really should!

@lukaszlenart
Copy link
Member

I have moved portlet-app away from the core project, please update your PR, it should work now :)

@victorsosa
Copy link
Contributor Author

it is ready

@asfgit asfgit merged commit 7f28bfd into apache:master Jul 18, 2016
@victorsosa victorsosa deleted the WW-4638 branch July 18, 2016 10:31
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.

4 participants