[TAV-742] JTidyWorkerTest fails due to character set assumptions Created: 2008-04-02  Updated: 2008-04-02  Resolved: 2008-04-02

Status: Resolved
Project: myGrid
Component/s: Taverna Processors
Affects Version/s: 1.5, 1.5.1,,,,,,, 1.5.2,, 1.6, 1.6.1, 1.6.2,, 1.7
Fix Version/s: 1.7.1

Type: Bug Priority: Minor
Reporter: Stian Soiland-Reyes Assignee: Stian Soiland-Reyes
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


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!
Time elapsed: 0.504 sec  <<< ERROR!
       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.

Comment by Stian Soiland-Reyes [ 2008-04-02 ]

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

Generated at Sat Sep 19 01:19:07 BST 2020 using JIRA 6.1.2#6157-sha1:98c729218aad6de1537eb8e98889ee5562c90d96.