Fix o.o.transport.netty4.OpenSearchLoggingHandlerIT stack overflow test failure (#1900)
Attempt to fix o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow by hardening test expectation patterns in regex patterns Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
parent
0f31d62cd9
commit
6dcfe8cdcc
|
@ -66,12 +66,13 @@ public class OpenSearchLoggingHandlerIT extends OpenSearchNetty4IntegTestCase {
|
||||||
|
|
||||||
@TestLogging(value = "org.opensearch.transport.netty4.OpenSearchLoggingHandler:trace,org.opensearch.transport.TransportLogger:trace", reason = "to ensure we log network events on TRACE level")
|
@TestLogging(value = "org.opensearch.transport.netty4.OpenSearchLoggingHandler:trace,org.opensearch.transport.TransportLogger:trace", reason = "to ensure we log network events on TRACE level")
|
||||||
public void testLoggingHandler() {
|
public void testLoggingHandler() {
|
||||||
final String writePattern = ".*\\[length: \\d+"
|
final String writePattern = "^.*\\[length: \\d+"
|
||||||
+ ", request id: \\d+"
|
+ ", request id: \\d+"
|
||||||
+ ", type: request"
|
+ ", type: request"
|
||||||
+ ", version: .*"
|
+ ", version: [^,]+"
|
||||||
|
+ ", header size: \\d+B"
|
||||||
+ ", action: cluster:monitor/nodes/hot_threads\\[n\\]\\]"
|
+ ", action: cluster:monitor/nodes/hot_threads\\[n\\]\\]"
|
||||||
+ " WRITE: \\d+B";
|
+ " WRITE: \\d+B$";
|
||||||
final MockLogAppender.LoggingExpectation writeExpectation = new MockLogAppender.PatternSeenEventExpectation(
|
final MockLogAppender.LoggingExpectation writeExpectation = new MockLogAppender.PatternSeenEventExpectation(
|
||||||
"hot threads request",
|
"hot threads request",
|
||||||
TransportLogger.class.getCanonicalName(),
|
TransportLogger.class.getCanonicalName(),
|
||||||
|
@ -86,12 +87,12 @@ public class OpenSearchLoggingHandlerIT extends OpenSearchNetty4IntegTestCase {
|
||||||
"*FLUSH*"
|
"*FLUSH*"
|
||||||
);
|
);
|
||||||
|
|
||||||
final String readPattern = ".*\\[length: \\d+"
|
final String readPattern = "^.*\\[length: \\d+"
|
||||||
+ ", request id: \\d+"
|
+ ", request id: \\d+"
|
||||||
+ ", type: request"
|
+ ", type: request"
|
||||||
+ ", version: .*"
|
+ ", version: [^,]+"
|
||||||
+ ", action: cluster:monitor/nodes/hot_threads\\[n\\]\\]"
|
+ ", action: cluster:monitor/nodes/hot_threads\\[n\\]\\]"
|
||||||
+ " READ: \\d+B";
|
+ " READ: \\d+B$";
|
||||||
|
|
||||||
final MockLogAppender.LoggingExpectation readExpectation = new MockLogAppender.PatternSeenEventExpectation(
|
final MockLogAppender.LoggingExpectation readExpectation = new MockLogAppender.PatternSeenEventExpectation(
|
||||||
"hot threads request",
|
"hot threads request",
|
||||||
|
|
Loading…
Reference in New Issue