From 09330056a01a4b5c3d16e3ffb6c1bff36099eb83 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 22 Dec 2014 10:02:49 +0200 Subject: java: simplify sleeping and waiting in tests - remove the SHORT_WAIT test parameter, no-one is using it - inline the various independent shortWait() methods - use the util.utils.shortWait() utility method everywhere Change-Id: I93cd4a2580172a1441d2ff3d390f52b9505e2721 --- ucb/qa/complex/tdoc/_XCommandProcessor.java | 10 ++-------- ucb/qa/complex/tdoc/_XComponent.java | 4 +--- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'ucb') diff --git a/ucb/qa/complex/tdoc/_XCommandProcessor.java b/ucb/qa/complex/tdoc/_XCommandProcessor.java index fba9912c1001..396822cb2342 100644 --- a/ucb/qa/complex/tdoc/_XCommandProcessor.java +++ b/ucb/qa/complex/tdoc/_XCommandProcessor.java @@ -215,20 +215,14 @@ public class _XCommandProcessor { for (int i = 0; i < 10; i++) { log.println("try to abort command"); oObj.abort(cmdId); - try { - Thread.sleep(10); - } catch (InterruptedException e) { - } + util.utils.pause(10); } } }; aborter.start(); - try { - Thread.sleep(15); - } catch (InterruptedException e) { - } + util.utils.pause(15); log.println("executing command"); try { diff --git a/ucb/qa/complex/tdoc/_XComponent.java b/ucb/qa/complex/tdoc/_XComponent.java index 582b0d66904d..47e920131cec 100644 --- a/ucb/qa/complex/tdoc/_XComponent.java +++ b/ucb/qa/complex/tdoc/_XComponent.java @@ -129,9 +129,7 @@ public class _XComponent { log.println( "begin dispose" + Thread.currentThread()); oObj.dispose(); - try { - Thread.sleep(500) ; - } catch (InterruptedException e) {} + util.utils.pause(500); if (Loutput[0]!=null) log.println(Loutput[0]); if (Loutput[1]!=null) log.println(Loutput[1]); log.println( "end dispose" + Thread.currentThread()); -- cgit