myGrid
  1. myGrid
  2. TAV-742

JTidyWorkerTest fails due to character set assumptions

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5, 1.5.1, 1.5.1.1, 1.5.1.2, 1.5.1.3, 1.5.1.4, 1.5.1.5, 1.5.1.6, 1.5.2, 1.5.2.1, 1.6, 1.6.1, 1.6.2, 1.6.2.1, 1.7
    • Fix Version/s: 1.7.1
    • Component/s: Taverna Processors
    • Labels:
      None

      Description

      As reported by Chathura Herath to taverna-hackers on 2008-03-26:

      Test set: net.sourceforge.taverna.scuflworkers.io.JTidyWorkerTest
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.52
      sec <<< FAILURE!
      testExecute(net.sourceforge.taverna.scuflworkers.io.JTidyWorkerTest)
      Time elapsed: 0.504 sec  <<< ERROR!
      sun.io.MalformedInputException
             at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:262)
             at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:314)
             at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364)
             at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250)
             at java.io.InputStreamReader.read(InputStreamReader.java:212)
             at java.io.BufferedReader.fill(BufferedReader.java:157)
             at java.io.BufferedReader.readLine(BufferedReader.java:320)
             at java.io.BufferedReader.readLine(BufferedReader.java:383)
             at net.sourceforge.taverna.scuflworkers.io.JTidyWorkerTest.testExecute(JTidyWorkerTest.java:38)
      

      The bug probably only appears on systems with a character encoding default that is different from latin1.

      Additionally, the test (of a component that is no longer included in the Taverna workbench) assumes network access and that http://www.nature.com/ is available.

      Suggest action is to either ignore or remove the failing test.

      If the test is to be fixed it should use a html file bundled in src/test/resources - and specify the encoding to InputStreamReader specifically. This bug is related to TAV-273 because it uses the constructor new InputStreamReader(InputStream) - and usage of such should also be checked for over all of the source code.

        Activity

        Hide
        Stian Soiland-Reyes added a comment -

        added @Ignore for the test and added comments about wrong character set assumptions

        Show
        Stian Soiland-Reyes added a comment - added @Ignore for the test and added comments about wrong character set assumptions

          People

          • Assignee:
            Stian Soiland-Reyes
            Reporter:
            Stian Soiland-Reyes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: