OpenJDK / graal / graal-jvmci-8
changeset 8118:a00ed9736260
8007776: Test6852078.java timeouts
Summary: if more than 100 seconds and more than 100 iterations have both passed, then exit is allowed.
Reviewed-by: kvn
author | drchase |
---|---|
date | Tue, 26 Feb 2013 15:38:24 -0800 |
parents | 706c919d3b56 |
children | b02157cd249f |
files | test/compiler/6852078/Test6852078.java |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/test/compiler/6852078/Test6852078.java Tue Feb 26 12:18:30 2013 +0100 +++ b/test/compiler/6852078/Test6852078.java Tue Feb 26 15:38:24 2013 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ * @bug 6852078 * @summary Disable SuperWord optimization for unsafe read/write * - * @run main/othervm Test6852078 + * @run main Test6852078 */ import java.util.*; @@ -50,7 +50,11 @@ } public static void main(String [] args) { + long start = System.currentTimeMillis(); for (int i=0; i<2000; i++) { + // To protect slow systems from test-too-long timeouts + if ((i > 100) && ((System.currentTimeMillis() - start) > 100000)) + break; Test6852078 t = new Test6852078(args); } }