changeset 53204:9a3750a63823

8215901: [TESTBUG] TestCheckedEnsureLocalCapacity.java fails intermittently Summary: Change pattern match to not require that the matching string start at the beginning of a line. Reviewed-by: dcubed, dholmes
author hseigel
date Wed, 09 Jan 2019 08:07:33 -0500
parents 7d8676b2487f
children 8f79bae1a535
files test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java	Wed Jan 09 10:19:54 2019 +0100
+++ b/test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java	Wed Jan 09 08:07:33 2019 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, 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
@@ -47,10 +47,13 @@
         { 1, 45 }   // bad: copies >> capacity
     };
 
+    // Patterns EXCEED_WARNING and WARNING are not anchored to the beginning
+    // of lines to allow matching interleaved output.
+
     private static final String EXCEED_WARNING =
-        "^WARNING: JNI local refs: \\d++, exceeds capacity:";
+        "WARNING: JNI local refs: \\d++, exceeds capacity:";
 
-    private static final String WARNING = "^WARNING: ";
+    private static final String WARNING = "WARNING:";
 
     public static void main(String[] args) throws Throwable {
         if (args.length == 2) {