assertj-swing
assertj-swing copied to clipboard
Confusion between 'eventPostingDelay' and 'delayBetweenEvents' (issue 127)
Issue by Alex Ruiz from Mon, 2 Mar 2009 14:09:36 -0600 Originally opened as http://jira.codehaus.org/browse/FEST-25
From Manuel Kueblboeck:
What steps will reproduce the problem?
application.= new FrameFixture(robot, getApplication.());
application.robot.settings().delayBetweenEvents(5);
What is the expected output? What do you see instead?
The delays should be shorter, but the execution doesn't get any faster.
What version of the product are you using? On what operating system?
fest-swing 1.0a
From Matthias Otterbach:
I figured out the cause of the long wait times between events Manuel and I were experiencing.
We just reduced the time of delayBetweenEvents, but didn't reduce the time of eventPostingDelay. After reducing eventPostingDelay execution gets faster again. I don't know if it is actually a bug, but maybe there should be a comment or hint in the Javadoc, that these two times are connected.
But the behavior in RobotFixture is also confusing probably wrong, in the method waitIfNecessary there is the following code:
if (eventPostingDelay > delayBetweenEvents) pause(eventPostingDelay - delayBetweenEvents);
When we created this bug, we had delayBetweenEvents set to 5 ms (we know, this is really short) and and eventPostingDelay set to its default value of 100 ms.
If I read the above code I figure out, we actually had a pause of 95 ms between each event. Now, if I would set delayBetweenEvents to 50 ms we would have a pause of only 50 ms between events? And even worse, if I set delayBetweenEvents to 99 ms we would have a pause of only 1 ms between events. Maybe I also missed a point somewhere.
Original report: Issue 127 (Google Code)
votes (original issue): 0 watches (original issue): 0