broadinstitute / barclay

Command line argument parser and online documentation generation utilities for java command line programs.
BSD 3-Clause "New" or "Revised" License
8 stars 6 forks source link

[Debian] four flaky tests in version 4.0.1 #184

Open pgrt opened 2 years ago

pgrt commented 2 years ago

Hello,

I am working on the Debian packaging of barclay. With version 4.0.1, I get 4 unit tests failing on many machines (but seemingly not all):

Gradle suite > Gradle test > org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest.testEnableMultiplePlugins FAILED org.broadinstitute.barclay.argparser.CommandLineException: requiredStringArgForPlugin is not a recognized option at org.broadinstitute.barclay.argparser.CommandLineArgumentParser.parseArguments(CommandLineArgumentParser.java:149) at org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest.testEnableMultiplePlugins(CommandLinePluginUnitTest.java:324)

Gradle suite > Gradle test > org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest.testPluginArgumentNameCollision FAILED org.testng.TestException: Method CommandLinePluginUnitTest.testPluginArgumentNameCollision()[pri:0, instance:org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest@7b8d2973] should have thrown an exception of type class org.broadinstitute.barclay.argparser.CommandLineException$CommandLineParserInternalException

Gradle suite > Gradle test > org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest.testPluginUsage FAILED java.lang.AssertionError: expected [true] but found [false] at org.testng.Assert.fail(Assert.java:94) at org.testng.Assert.failNotEquals(Assert.java:513) at org.testng.Assert.assertTrue(Assert.java:42) at org.testng.Assert.assertTrue(Assert.java:52) at org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest.testPluginUsage(CommandLinePluginUnitTest.java:246)

Gradle suite > Gradle test > org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest.testRequiredDependentArguments[0](TestPluginWithRequiredArg, requiredStringArgForPlugin, fakeArgValue) FAILED org.testng.TestException: Method CommandLinePluginUnitTest.testRequiredDependentArguments(java.lang.String, java.lang.String, java.lang.String)[pri:0, instance:org.broadinstitute.barclay.argparser.CommandLinePluginUnitTest@7b8d2973] should have thrown an exception of type class org.broadinstitute.barclay.argparser.CommandLineException$MissingArgument

Would you please have any idea how to solve this? Are you able to reproduce it?

Thanks a lot and best wishes, Pierre

cmnbroad commented 2 years ago

@pgrt That definitely seems a bit odd - especially that its only on some machines. Those tests pass quite reliably on the Ubuntu and MacOS platforms we usually run them on, and I don't see anything obvious about them that would cause them to be flaky.

pgrt commented 2 years ago

Hi,

Thanks for your answer! I admit I am also puzzled by this. So far I have just patched out the tests in the Debian build as I cannot understand what is going on. We'll see...

Please feel free to close the issue if you wish, as your comment seems to indicate it is definitely not an issue with barclay...

Best wishes, Pierre