You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/24 06:12:54 UTC

[GitHub] [pulsar] michaeljmarshall commented on pull request #14269: Fix validateGlobalNamespaceOwnership wrap exception issue.

michaeljmarshall commented on pull request #14269:
URL: https://github.com/apache/pulsar/pull/14269#issuecomment-1049527923


   I am unable to cherry-pick this to 2.8.3 because of test errors in the mocking. I am moving it to 2.8.4 for now. After cherry-picking and resolving conflicts, I run `mvn -pl :pulsar-broker test -Dtest="PersistentTopicsTest#testCreateTopicWithReplicationCluster"` and get the following test error:
   
   ```
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.pulsar.broker.admin.PersistentTopicsTest
   [ERROR] Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 13.607 s <<< FAILURE! - in org.apache.pulsar.broker.admin.PersistentTopicsTest
   [ERROR] testCreateTopicWithReplicationCluster(org.apache.pulsar.broker.admin.PersistentTopicsTest)  Time elapsed: 0.007 s  <<< FAILURE!
   org.mockito.exceptions.misusing.WrongTypeOfReturnValue:
   
   NamespaceResources$MockitoMock$634217304 cannot be returned by getPulsarResources()
   getPulsarResources() should return PulsarResources
   ***
   If you're unsure why you're getting above error read on.
   Due to the nature of the syntax above problem might occur because:
   1. This exception *might* occur in wrongly written multi-threaded tests.
      Please refer to Mockito FAQ on limitations of concurrency testing.
   2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub spies -
      - with doReturn|Throw() family of methods. More in javadocs for Mockito.spy() method.
   
   	at org.apache.pulsar.broker.admin.PersistentTopicsTest.testCreateTopicWithReplicationCluster(PersistentTopicsTest.java:389)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
   	at java.base/java.lang.Thread.run(Thread.java:832)
   
   [INFO]
   [INFO] Results:
   [INFO]
   [ERROR] Failures:
   [ERROR] org.apache.pulsar.broker.admin.PersistentTopicsTest.testCreateTopicWithReplicationCluster(org.apache.pulsar.broker.admin.PersistentTopicsTest)
   [INFO]   Run 1: PASS
   [ERROR]   Run 2: PersistentTopicsTest.testCreateTopicWithReplicationCluster:389 WrongTypeOfReturnValue
   [INFO]
   [INFO]
   [ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 2
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org