public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* [patch] Expect correct TimeoutException
@ 2007-07-09 15:13 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2007-07-09 15:13 UTC (permalink / raw)
  To: frysk

Hi,

While writing a test and not understanding why I always got a
TimeoutException saying that my 5 seconds were up, while I had requested
more, I suddenly realized the TimeoutException was reporting the wrong
value. This patch fixes that and makes TimeoutException always report
the time as used.

2007-07-09  Mark Wielaard  <mwielaard@redhat.com>

    * Expect.java (expectMilliseconds): Use supplied milli seconds for
    reporting TimeoutException.

Tested on x86 Fedora 7, no regressions.

Cheers,

Mark

diff -u -r1.12 Expect.java
--- frysk-imports/frysk/expunit/Expect.java     13 Apr 2007 21:21:13 -0000     1.12
+++ frysk-imports/frysk/expunit/Expect.java     9 Jul 2007 15:05:30 -0000
@@ -221,7 +221,7 @@
            long timeRemaining = endTime - System.currentTimeMillis ();
            if (timeRemaining <= 0) {
                logger.log (Level.FINE, "{0} match TIMEOUT\n", this);
-               throw new TimeoutException (timeoutSeconds);
+               throw new TimeoutException (timeoutMilliseconds / 1000);
            }
 
            logger.log (Level.FINE,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-09 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-09 15:13 [patch] Expect correct TimeoutException Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).