curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Henke (JIRA)" <>
Subject [jira] [Created] (CURATOR-281) Usage of TestingServer fails when upgrading to 3.0
Date Fri, 13 Nov 2015 04:39:11 GMT
Grant Henke created CURATOR-281:

             Summary: Usage of TestingServer fails when upgrading to 3.0
                 Key: CURATOR-281
             Project: Apache Curator
          Issue Type: Bug
            Reporter: Grant Henke
            Assignee: Jordan Zimmerman

If I upgrade from 2.9.2 to 3.0 and run my existing unit tests I get this error on all tests:
org.scurator.TestGetChildren > initializationError FAILED
    java.lang.NoClassDefFoundError: org/testng/Assert
        at org.apache.curator.test.TestingZooKeeperMain.blockUntilStarted(
        at org.apache.curator.test.TestingZooKeeperServer.start(
        at org.apache.curator.test.TestingServer.<init>(
        at org.apache.curator.test.TestingServer.<init>(
        at org.apache.curator.test.TestingServer.<init>(
        at org.scurator.BaseSCuratorTest$class.beforeEach(BaseSCuratorTest.scala:33)
        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 Method)
            at java.lang.ClassLoader.loadClass(
            at sun.misc.Launcher$AppClassLoader.loadClass(
            at java.lang.ClassLoader.loadClass(
            ... 15 more

The code it points to is here:

Its caused because I am an external user from the project and testng is marked as provided

The only other place testng is used is, 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

View raw message