Here's some additional information. I have confirmation from one other individual indicating that they see the same behavior I do, so at least it's not just me ;) Anybody else seeing the same behavior?
I tried debugging the process, and the unit tests succeed every time I have tried, so it's probably a timing issue. I changed the timing a bit more and noticed that it doesn't seem to matter how large (or small) the difference between the timeout and the time at which the event comes back. If the event comes back after the timer expired, then FlexUnit stops processing the tests shortly thereafter. I'm welcome to suggestions on where to look to figure out what's going on. Thanks for the help. --Kaleb --- In [email protected], "kaleb_pederson" <[EMAIL PROTECTED]> wrote: > > Hello all, > > In the process of adding more unit tests to our test suite, I > discovered a bug that would cause FlexUnit to freeze and stop > processing any remaining test cases. Although it was inconsistent > in where it stopped processing, it would stop processing about 73% > of the time! > > I have been able to isolate a test case that is reproduceable almost > all of the time on my machine (when running in Flex Builder in > either debug mode or standard mode). > > This test case has about 10 different tests, about three of which > are usually completed per run. The rest of the time it sits in a > timer loop just waiting for something that never happens. Sometimes > it will finish two, sometimes it will finish four. It usually > indicates that it finished less than it reports in errors. And, > despite the failure, it doesn't update the count. > > I have confirmed that I have the latest version of FlexUnit and the > Latest version of the Flash player (9.0.16.0). This reproduces > under both Internet Explorer and Firefox. > > Here's the sample code: > > package > { > import flexunit.framework.TestCase; > import flash.utils.Timer; > import flash.events.TimerEvent; > > public class UnitTestBugTest extends TestCase > { > private var timer:Timer; > private const TIMEOUT:Number = 500; > > public function test1():void { > var tempfunc:Function = addAsync(handleResponseOne, TIMEOUT); > timer = new Timer(600,1); > addAsync(onCalledFail,TIMEOUT,"test1",onNotCalledIgnore); > timer.addEventListener(TimerEvent.TIMER_COMPLETE,tempfunc); > timer.start(); > } > public function test2():void {trace('test2');} > public function test3():void {trace('test3');} > public function test4():void {trace('test4');} > public function test5():void {trace('test5');} > public function test6():void {trace('test6');} > public function test7():void {trace('test7');} > public function test8():void {trace('test8');} > public function test9():void {trace('test9');} > public function test10():void {trace('test10');} > public function handleResponseOne(e:TimerEvent):void {} > public function onNotCalledIgnore(data:Object):void {} > public function onCalledFail(e:*):void { fail('failed!'); } > } > } > > If I remove the second call to addAsync, everything works correctly. > > Please let me know if you are able to reproduce this and if there is > any other information that would be useful or that I can provide to > help fix this problem. > > Thanks. > > --Kaleb > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

