curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-281) Usage of TestingServer fails when upgrading to 3.0
Date Tue, 17 Nov 2015 19:46:10 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15009362#comment-15009362
] 

ASF GitHub Bot commented on CURATOR-281:
----------------------------------------

Github user granthenke commented on the pull request:

    https://github.com/apache/curator/pull/119#issuecomment-157484850
  
    Closing as this was committed, but not auto-closed since it was in the 3.0 branch and
not the current default branch.


> Usage of TestingServer fails when upgrading to 3.0
> --------------------------------------------------
>
>                 Key: CURATOR-281
>                 URL: https://issues.apache.org/jira/browse/CURATOR-281
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 3.0.0
>            Reporter: Grant Henke
>            Assignee: Mike Drob
>             Fix For: 3.0.1
>
>
> If I upgrade from 2.9.2 to 3.0 and run my existing unit tests I get this error on all
tests:
> {noformat}
> org.scurator.TestGetChildren > initializationError FAILED
>     java.lang.NoClassDefFoundError: org/testng/Assert
>         at org.apache.curator.test.TestingZooKeeperMain.blockUntilStarted(TestingZooKeeperMain.java:135)
>         at org.apache.curator.test.TestingZooKeeperServer.start(TestingZooKeeperServer.java:159)
>         at org.apache.curator.test.TestingServer.<init>(TestingServer.java:117)
>         at org.apache.curator.test.TestingServer.<init>(TestingServer.java:100)
>         at org.apache.curator.test.TestingServer.<init>(TestingServer.java:41)
>         at org.scurator.BaseSCuratorTest$class.beforeEach(BaseSCuratorTest.scala:33)
>         at org.scurator.TestGetChildren.org$scurator$SCuratorTestClient$$super$beforeEach(TestGetChildren.scala:14)
>         at org.scurator.SCuratorTestClient$class.beforeEach(SCuratorTestClient.scala:20)
>         at org.scurator.TestGetChildren.beforeEach(TestGetChildren.scala:14)
>         at org.scalatest.BeforeAndAfterEach$class.beforeEach(BeforeAndAfterEach.scala:154)
>         at org.scurator.TestGetChildren.beforeEach(TestGetChildren.scala:14)
>         at org.scalatest.BeforeAndAfterEach$class.beforeEach(BeforeAndAfterEach.scala:173)
>         at org.scurator.TestGetChildren.beforeEach(TestGetChildren.scala:14)
>         at org.scalatest.BeforeAndAfterEach$class.runTest(BeforeAndAfterEach.scala:253)
>         at org.scurator.TestGetChildren.runTest(TestGetChildren.scala:14)
>         Caused by:
>         java.lang.ClassNotFoundException: org.testng.Assert
>             at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>             at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>             at java.security.AccessController.doPrivileged(Native Method)
>             at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>             at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>             at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>             at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>             ... 15 more
> {noformat}
> The code it points to is here: 
> https://github.com/apache/curator/blob/apache-curator-3.0.0/curator-test/src/main/java/org/apache/curator/test/TestingZooKeeperMain.java#L135
> Its caused because I am an external user from the project and testng is marked as provided
here:
> https://github.com/apache/curator/blob/apache-curator-3.0.0/curator-test/pom.xml#L53-L57
> The only other place testng is used is BaseClassForTests.java, which makes sense. I propose
using a standard java assertion here to avoid the dependency for those using TestingServer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message