mirror of https://github.com/apache/druid.git
fix test pattern matching for jdk11 (#7602)
This change makes the error pattern more generic to account for differences between JDK versions.
This commit is contained in:
parent
c58aa2f2ab
commit
b3c7463059
|
@ -161,6 +161,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class AppenderatorDriverRealtimeIndexTaskTest
|
||||
{
|
||||
|
@ -1242,8 +1243,12 @@ public class AppenderatorDriverRealtimeIndexTaskTest
|
|||
|
||||
IngestionStatsAndErrorsTaskReportData reportData = getTaskReportData();
|
||||
Assert.assertEquals(expectedMetrics, reportData.getRowStats());
|
||||
Assert.assertTrue(status.getErrorMsg()
|
||||
.contains("java.lang.IllegalArgumentException\n\tat java.nio.Buffer.position"));
|
||||
|
||||
Pattern errorPattern = Pattern.compile(
|
||||
"(?s)java\\.lang\\.IllegalArgumentException.*\n"
|
||||
+ "\tat (java\\.base/)?java\\.nio\\.Buffer\\..*"
|
||||
);
|
||||
Assert.assertTrue(errorPattern.matcher(status.getErrorMsg()).matches());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue