Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct spelling of MockLogAppender.PatternSeenEventExpectation #41893

Merged
merged 1 commit into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testLoggingHandler() throws IllegalAccessException {
", action: cluster:monitor/nodes/hot_threads\\[n\\]\\]" +
" WRITE: \\d+B";
final MockLogAppender.LoggingExpectation writeExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"hot threads request", TransportLogger.class.getCanonicalName(), Level.TRACE, writePattern);

final MockLogAppender.LoggingExpectation flushExpectation =
Expand All @@ -74,7 +74,7 @@ public void testLoggingHandler() throws IllegalAccessException {
" READ: \\d+B";

final MockLogAppender.LoggingExpectation readExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"hot threads request", TransportLogger.class.getCanonicalName(), Level.TRACE, readPattern);

appender.addExpectation(writeExpectation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testLoggingHandler() throws IllegalAccessException {
", action: cluster:monitor/nodes/hot_threads\\[n\\]\\]" +
" WRITE: \\d+B";
final MockLogAppender.LoggingExpectation writeExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"hot threads request", TransportLogger.class.getCanonicalName(), Level.TRACE, writePattern);

final String readPattern =
Expand All @@ -69,7 +69,7 @@ public void testLoggingHandler() throws IllegalAccessException {
" READ: \\d+B";

final MockLogAppender.LoggingExpectation readExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"hot threads request", TransportLogger.class.getCanonicalName(), Level.TRACE, readPattern);

appender.addExpectation(writeExpectation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testLoggingHandler() throws IOException {
", action: cluster:monitor/stats]" +
" WRITE: \\d+B";
final MockLogAppender.LoggingExpectation writeExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"hot threads request", TransportLogger.class.getCanonicalName(), Level.TRACE, writePattern);

final String readPattern =
Expand All @@ -78,7 +78,7 @@ public void testLoggingHandler() throws IOException {
" READ: \\d+B";

final MockLogAppender.LoggingExpectation readExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"cluster monitor request", TransportLogger.class.getCanonicalName(), Level.TRACE, readPattern);

appender.addExpectation(writeExpectation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ public boolean innerMatch(final LogEvent event) {

}

public static class PatternSeenEventExcpectation implements LoggingExpectation {
public static class PatternSeenEventExpectation implements LoggingExpectation {

protected final String name;
protected final String logger;
protected final Level level;
protected final String pattern;
volatile boolean saw;

public PatternSeenEventExcpectation(String name, String logger, Level level, String pattern) {
public PatternSeenEventExpectation(String name, String logger, Level level, String pattern) {
this.name = name;
this.logger = logger;
this.level = level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1053,19 +1053,19 @@ public String executor() {

final String requestSent = ".*\\[internal:test].*sent to.*\\{TS_B}.*";
final MockLogAppender.LoggingExpectation requestSentExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"sent request", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, requestSent);
final String requestReceived = ".*\\[internal:test].*received request.*";
final MockLogAppender.LoggingExpectation requestReceivedExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"received request", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, requestReceived);
final String responseSent = ".*\\[internal:test].*sent response.*";
final MockLogAppender.LoggingExpectation responseSentExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"sent response", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, responseSent);
final String responseReceived = ".*\\[internal:test].*received response from.*\\{TS_B}.*";
final MockLogAppender.LoggingExpectation responseReceivedExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"received response", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, responseReceived);

appender.addExpectation(requestSentExpectation);
Expand All @@ -1080,12 +1080,12 @@ public String executor() {

final String errorResponseSent = ".*\\[internal:testError].*sent error response.*";
final MockLogAppender.LoggingExpectation errorResponseSentExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"sent error response", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, errorResponseSent);

final String errorResponseReceived = ".*\\[internal:testError].*received response from.*\\{TS_B}.*";
final MockLogAppender.LoggingExpectation errorResponseReceivedExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"received error response", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, errorResponseReceived);

appender.addExpectation(errorResponseSentExpectation);
Expand All @@ -1101,7 +1101,7 @@ public String executor() {
"not seen request sent", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, notSeenSent);
final String notSeenReceived = ".*\\[internal:testNotSeen].*received request.*";
final MockLogAppender.LoggingExpectation notSeenReceivedExpectation =
new MockLogAppender.PatternSeenEventExcpectation(
new MockLogAppender.PatternSeenEventExpectation(
"not seen request received", "org.elasticsearch.transport.TransportService.tracer", Level.TRACE, notSeenReceived);

appender.addExpectation(notSeenSentExpectation);
Expand Down