rdhabalia opened a new pull request #12675:
URL: https://github.com/apache/pulsar/pull/12675


   ### Motivation
   
[PulsarAdminTool](https://github.com/apache/pulsar/blob/master/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/PulsarAdminTool.java#L297)
 returns with exist-code `0` with empty argument.
   
[TestRunMain::runMainNoArguments](https://github.com/apache/pulsar/blob/master/pulsar-client-tools/src/test/java/org/apache/pulsar/admin/cli/TestRunMain.java#L34)
 checks incorrect assertion. this change was introduced by 
https://github.com/apache/pulsar/pull/12581
   ```
   java.lang.AssertionError: expected [1] but found [0]
        at org.testng.Assert.fail(Assert.java:99)
        at org.testng.Assert.failNotEquals(Assert.java:1037)
        at org.testng.Assert.assertEqualsImpl(Assert.java:140)
        at org.testng.Assert.assertEquals(Assert.java:122)
        at org.testng.Assert.assertEquals(Assert.java:907)
        at org.testng.Assert.assertEquals(Assert.java:917)
        at 
org.apache.pulsar.admin.cli.TestRunMain.runMainNoArguments(TestRunMain.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
   ```
   
   ### Modification
   - fix the test
   -  add reset method to handle static code to avoid test failure due to 
previous tests.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to