Opened 10 years ago

Closed 7 years ago

#15277 closed defect (patchwelcome)

dojox.lang.async test failures

Reported by: bill Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.13
Component: Dojox Version: 1.7.2
Keywords: dohfail Cc:
Blocked By: Blocking:


I'm getting test failures on util/doh/runner.html?testModule=dojox.lang.tests.async.

But, more than that, the tests themselves aren't running correctly. As the code is now, there are two problems:

  1. DOH thinks each test is finished even though it's still running. (It leads to lots of flashing during the test, and bars changing from green to blue, and back to green again, percentages > 100%, all the test running concurrently etc.)
  2. When asynchronously executed functions throw an error, the error gets ignored.

Each asynchronous test needs to return a Deferred, probably a doh.Deferred, and every function call inside of a test needs to be wrapped in d.getTestCallBack(), if that's the function that ends the test, or d.getTestErrback() if the test is supposed to continue after the function completes.

I tried to fix the file but it's pretty complicated and I'm not sure what exactly is supposed to be happening or whether the async functions are already theoretically returning a Deferred, in which case there's another problem. I'll attach my patch anyway as a starting point.

Attachments (1)

fixAsyncTest.patch (4.8 KB) - added by bill 10 years ago.
failed attempt to patch the tests to work

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by bill

Keywords: dohfail added
Owner: changed from Adam Peller to Eugene Lazutkin
Status: newassigned

comment:2 Changed 10 years ago by bill

PS: it looks like the async code is depending myDeferred.addCallback(cb1).addCallback(cb2) creating a chain of callbacks where each one waits for the one before it, and each callback can modify the value passed to the next callback. While that theoretically still works, I wouldn't be surprised if it's broken.

Changed 10 years ago by bill

Attachment: fixAsyncTest.patch added

failed attempt to patch the tests to work

comment:3 Changed 7 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.