Skip to content

Commit

Permalink
Correct spelling of MockLogAppender.PatternSeenEventExpectation (#41893)
Browse files Browse the repository at this point in the history
The class was called PatternSeenEventExcpectation. This commit
is a straight class rename to correct the spelling.
  • Loading branch information
romseygeek authored and jasontedor committed May 7, 2019
1 parent 96bf049 commit f7f6c44
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
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

0 comments on commit f7f6c44

Please sign in to comment.