ASF Bugzilla – Attachment 31871 Details for
Bug 56810
ANT: test target fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
tomcat.patch (text/plain), 1.26 KB, created by
Asaf
on 2014-08-04 12:51:56 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Asaf
Created:
2014-08-04 12:51:56 UTC
Size:
1.26 KB
patch
obsolete
>Index: TesterOpenSSL.java >=================================================================== >--- TesterOpenSSL.java (revision 1615499) >+++ TesterOpenSSL.java (working copy) >@@ -180,7 +180,7 @@ > t2.start(); > > try { >- p.waitFor(2, TimeUnit.SECONDS); >+ waitForProcess(p, 2); > } catch (InterruptedException e) { > throw new IOException(e); > } >@@ -193,6 +193,24 @@ > return stdout.getText().trim(); > } > >+ private static boolean waitForProcess(Process p, int seconds) throws InterruptedException { >+ long startTime = System.nanoTime(); >+ long rem = TimeUnit.SECONDS.toNanos(seconds); >+ >+ do { >+ try { >+ p.exitValue(); >+ return true; >+ } catch(IllegalThreadStateException ex) { >+ if (rem > 0) { >+ Thread.sleep(Math.min(TimeUnit.NANOSECONDS.toMillis(rem) + 1, 100)); >+ } >+ } >+ rem = TimeUnit.SECONDS.toNanos(seconds) - (System.nanoTime() - startTime); >+ } while (rem > 0); >+ return false; >+ } >+ > private static class InputStreamToText implements Runnable { > > private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56810
:
31870
| 31871