OpenNLP
  1. OpenNLP
  2. OPENNLP-41

Unit test ArgumentParserTest.testSimpleArgumentsUsage can ocasionally fail

    Details

      Description

      The test opennlp.tools.cmdline.ArgumentParserTest.testSimpleArgumentsUsage() is failing here. Is it happening to anyone else?
      I checked the ArgumentParser class. The method createUsage(Class<T> argProxyInterface) works by getting the methods of the argProxyInterface class using the getMethods() method.
      The javadoc of getMethods() method says: "... The elements in the array returned are not sorted and are not in any particular order. ...".
      So we can't expect the usage string to be the same to everybody. To me it is "[-iterations num] [-alphaNumOpt true|false] -encoding charset", but the expected is "-encoding charset [-iterations num] [-alphaNumOpt true|false]", so my build fails.

        Activity

        William Colen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Joern Kottmann made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Joern Kottmann made changes -
        Field Original Value New Value
        Assignee Jörn Kottmann [ joern ]
        William Colen created issue -

          People

          • Assignee:
            Joern Kottmann
            Reporter:
            William Colen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development