Re: [qooxdoo-devel] Multimple asyncrhonous test
Brought to you by:
ecker,
martinwittemann
From: Daniel W. <dan...@1u...> - 2012-03-30 11:13:34
|
Hi, your code looks fine and it works for me when I run it in the qx 1.6 Test Runner, (both the source and build version of the tests): "test async" passes and "test async2" fails with the message "It should fail.". Are you seeing the same problem in the build and source versions? (generate.py test and test-source, respectively)? Anything special about your configuration? Regards, Daniel On 03/30/2012 11:18 AM, A Matías Quezada wrote: > Hi all, > > We are writing some tests for our product and we need to do asyncrhonous > test. We've found at your manual's page about "The qooxdoo Test Runner" > (http://manual.qooxdoo.org/1.6/pages/development/frame_apps_testrunner.html) > how are asynchronous test mented to be implemented, but when we write > two asynchronous tests one after the other: > > "test async": function() { > var self = this; > window.setTimeout(function() { > self.resume(function() { > this.assertTrue(true, "It should work."); > }, self); > }, 1000); > this.wait(25000); > }, > "test async2": function() { > var self = this; > window.setTimeout(function() { > self.resume(function() { > this.assertTrue(false, "It should fail."); > }, self); > }, 1000); > this.wait(25000); > } > > > The throw two errors: > > Test failed: Timeout reached before resume() was called. - > Asynchronous Test Error > Test failed: resume() called before wait() > > As I understand, two .wait() orders collide. Is that the way > asynchronous test ment to be written? Am I wrong on something? > > --- > > A. Matías Quezada > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > > _______________________________________________ > qooxdoo-devel mailing list > qoo...@li... > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |