Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3663

Topology with Mockito 1.x fails to run unit tests

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0, 2.2.1
    • Component/s: None
    • Labels:
      None

      Description

      We are observing problems building topologies with latest snapshot storm version. It used to work fine. After debugging, we have identified that the problem comes from 

      https://github.com/apache/storm/blob/master/storm-client/src/resources/mockito-extensions/org.mockito.plugins.MockMaker

      This break topology if Mockito was used. This file should be a test level resource.

       

      Configuring TestNG with: TestNG652ConfiguratorConfiguring TestNG with: TestNG652ConfiguratorSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/Users/rli01/.m2/repository/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/Users/rli01/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.11.2/log4j-slf4j-impl-2.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]Tests run: 37, Failures: 12, Errors: 0, Skipped: 0, Time elapsed: 1.135 sec <<< FAILURE! - in TestSuitetestCycling(fetl.bullet.propane.PropaneSpoutTest)  Time elapsed: 0.147 sec  <<< FAILURE!java.lang.ExceptionInInitializerError: null at org.mockito.internal.configuration.plugins.Plugins.getStackTraceCleanerProvider(Plugins.java:17) at org.mockito.internal.exceptions.stacktrace.StackTraceFilter.<clinit>(StackTraceFilter.java:21) at org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter.<init>(ConditionalStackTraceFilter.java:17) at org.mockito.exceptions.base.MockitoException.filterStackTrace(MockitoException.java:41) at org.mockito.exceptions.base.MockitoException.<init>(MockitoException.java:30) at org.mockito.exceptions.misusing.MockitoConfigurationException.<init>(MockitoConfigurationException.java:18) at org.mockito.internal.configuration.plugins.PluginLoader.loadImpl(PluginLoader.java:66) at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:24) at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:12) at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:11) at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:24) at org.mockito.internal.MockitoCore.<init>(MockitoCore.java:44) at org.mockito.Mockito.<clinit>(Mockito.java:975) at fetl.bullet.propane.PropaneSpoutTest.createKafkaConsumer(PropaneSpoutTest.java:71) at fetl.bullet.propane.PropaneSpoutTest.createKafkaConsumer(PropaneSpoutTest.java:87) at fetl.bullet.propane.PropaneSpoutTest.testCycling(PropaneSpoutTest.java:170)
      
       

        Attachments

          Activity

            People

            • Assignee:
              li530 Rui Li
              Reporter:
              li530 Rui Li
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m