Closed Bug 482455 Opened 11 years ago Closed 11 years ago

Tests from bug 445886 (test_unicode_noncharacters_utf8.html, say) failing randomly

Categories

(Core :: Internationalization, defect, major)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: bzbarsky, Assigned: smontagu)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

This morning:

*** 42317 ERROR TEST-UNEXPECTED-FAIL | /tests/intl/uconv/tests/test_unicode_noncharacters_gb18030.html | Error thrown during test: $("display") is null - got 0, expected 1
*** 42320 ERROR TEST-UNEXPECTED-FAIL | /tests/intl/uconv/tests/test_unicode_noncharacters_utf8.html | Error thrown during test: $("display") is null - got 0, expected 1

Looking at the tests, it looks like they assume that 100ms will be enough time to parse the HTML between the script end and the <p id="display">.  Clearly that's false in this case for whatever reason.

That said, is there a reason the test is using setTimeout at all instead of just running the test from onload?
And while we're here, is there a reason to use:

  ok($("display").innerHTML == "All good.", "Noncharacters not stripped");

instead of:

  is($("display").innerHTML, "All good.", "Noncharacters not stripped");

?  The latter produces much more useful output (e.g. the actual value of innerHTML) when it fails.
Ftr, this build had
{
/builds/moz2_slave/mozilla-central-linux-unittest/build/js/src/configure: line 2574: echo: write error: Broken pipe
}
Attached patch PatchSplinter Review
Like so?
Attachment #366557 - Flags: review?(bzbarsky)
Comment on attachment 366557 [details] [diff] [review]
Patch

Looks reasonable, assuming this is still testing what you wanted to test.
Attachment #366557 - Flags: review?(bzbarsky) → review+
http://hg.mozilla.org/mozilla-central/rev/8378b438aa5c

(In reply to comment #5)
> Looks reasonable, assuming this is still testing what you wanted to test.
Yeah, I confirmed this by introducing bugs into the converters to see if the tests failed in the expected manner.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.2a1
Whiteboard: [orange]
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.