Opened 11 years ago
Closed 9 years ago
#11407 closed defect (fixed)
tests.cache test failure on build
Reported by: | Adam Peller | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | BuildTools | Version: | 1.5.0b2 |
Keywords: | dohfail | Cc: | |
Blocked By: | Blocking: |
Description
Failed on Chrome 5.0, FF 3.6.6 (both Mac)
GROUP "tests.cache" has 1 test to run _AssertFailure: doh._AssertFailure: assertEqual() failed: expected but got <h1>Hello World</h1> : assertEqual() failed: expected but got <h1>Hello World</h1> doh._AssertFailure: assertEqual() failed: expected but got <h1>Hello World</h1> ERROR IN: function (t){ var expected = "<h1>Hello World</h1>"; t.is(expected, dojo.trim(dojo.cache("dojo.tests.cache", "regular.html", "<h1>Hello World</h1>\n"))); t.is(expected, dojo.trim(dojo.cache("dojo.tests.cache", "sanitized.html", {value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\t\"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t<script type=\"text/javascript\" src=\"../../dojo.js\"></script>\n\t\t<script type=\"text/javascript\" src=\"../../cache.js\"></script>\n\t</head>\n\t<body class=\"tundra\">\n\t\t<h1>Hello World</h1>\n\t</body>\n</html>\n",sanitize: true}))); //Test object variant for module. var objPath = dojo.moduleUrl("dojo.tests.cache", "object.html").toString(); t.is(expected, dojo.trim(dojo.cache(new dojo._Url(objPath), {sanitize: true}))); //Just a couple of other passes just to make sure on manual inspection that the //files are loaded over the network only once. t.is(expected, dojo.trim(dojo.cache("dojo.tests.cache", "regular.html", "<h1>Hello World</h1>\n"))); t.is(expected, dojo.trim(dojo.cache("dojo.tests.cache", "sanitized.html", {value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\t\"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t<script type=\"text/javascript\" src=\"../../dojo.js\"></script>\n\t\t<script type=\"text/javascript\" src=\"../../cache.js\"></script>\n\t</head>\n\t<body class=\"tundra\">\n\t\t<h1>Hello World</h1>\n\t</body>\n</html>\n",sanitize: true}))); t.is(expected, dojo.trim(dojo.cache(new dojo._Url(objPath), {sanitize: true}))); //Make sure unset cache does not throw errors t.is(null, dojo.cache("dojo.tests.cache", "regular.html", null)); //Set empty string as value t.is("", dojo.cache("dojo.tests.cache", "regular.html", "")); t.is("", dojo.cache("dojo.tests.cache", "regular.html", "<h1>Hello World</h1>\n")); } FAILED test: undefined 3 ms
Change History (3)
comment:1 Changed 11 years ago by
Component: | General → BuildTools |
---|
comment:2 Changed 10 years ago by
Keywords: | dohfail added |
---|
comment:3 Changed 9 years ago by
Milestone: | tbd → 1.7 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Summary: | tests.cache test failure → tests.cache test failure on build |
http://archive.dojotoolkit.org/nightly/dojotoolkit/util/doh/runner.html?testModule=dojo/tests/cache is now working fine for me on FF11/mac and FF3.6/win. Likewise so is http://download.dojotoolkit.org/release-1.7.1/dojo-release-1.7.1/util/doh/runner.html?testModule=dojo/tests/cache.
So this appears fixed in 1.7 or earlier.
Note: See
TracTickets for help on using
tickets.
Looks like this is just a problem with how the build system and test interact. http://archive.dojotoolkit.org/dojo-2010-07-02/checkout/util/doh/runner.html?testModule=tests.cache works fine.
Probably the issue is that the build system mucks with the dojo.cache() references in the test file.
It's unclear though which assert is failing, all of those t.is() calls need a third argument (a text string comment) to differentiate them.