logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1374808 - /logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
Date Sun, 19 Aug 2012 17:41:33 GMT
Author: rgoers
Date: Sun Aug 19 17:41:33 2012
New Revision: 1374808

URL: http://svn.apache.org/viewvc?rev=1374808&view=rev
Log:
Modify test to insure correct messages are received

Modified:
    logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java

Modified: logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java?rev=1374808&r1=1374807&r2=1374808&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
(original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/test/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedAppenderTest.java
Sun Aug 19 17:41:33 2012
@@ -153,7 +153,7 @@ public class FlumeEmbeddedAppenderTest {
     @Test
     public void testLog4Event() throws InterruptedException, IOException {
 
-        StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Message", "Test");
+        StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Log4j", "Test");
         EventLogger.logEvent(msg);
 
         Transaction transaction = channel.getTransaction();
@@ -163,7 +163,7 @@ public class FlumeEmbeddedAppenderTest {
    	    Assert.assertNotNull(event);
         String body = getBody(event);
   	    Assert.assertTrue("Channel contained event, but not expected message. Received: "
+ body,
-            body.endsWith("Test Message"));
+            body.endsWith("Test Log4j"));
 	      transaction.commit();
 	      transaction.close();
 
@@ -174,7 +174,7 @@ public class FlumeEmbeddedAppenderTest {
     public void testMultiple() throws InterruptedException, IOException {
 
         for (int i = 0; i < 10; ++i) {
-            StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Message "
+ i, "Test");
+            StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Multiple
" + i, "Test");
             EventLogger.logEvent(msg);
         }
         for (int i = 0; i < 10; ++i) {
@@ -185,7 +185,7 @@ public class FlumeEmbeddedAppenderTest {
             Assert.assertNotNull(event);
             String body = getBody(event);
             Assert.assertTrue("Channel contained event, but not expected message. Received:
" + body,
-                body.endsWith("Test Message " + i));
+                body.endsWith("Test Multiple " + i));
             transaction.commit();
             transaction.close();
         }
@@ -199,7 +199,7 @@ public class FlumeEmbeddedAppenderTest {
         Logger logger = LogManager.getLogger("testFailover");
         logger.debug("Starting testFailover");
         for (int i = 0; i < 10; ++i) {
-            StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Message "
+ i, "Test");
+            StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Primary "
+ i, "Test");
             EventLogger.logEvent(msg);
         }
         for (int i = 0; i < 10; ++i) {
@@ -210,7 +210,7 @@ public class FlumeEmbeddedAppenderTest {
             Assert.assertNotNull(event);
             String body = getBody(event);
             Assert.assertTrue("Channel contained event, but not expected message. Received:
" + body,
-                body.endsWith("Test Message " + i));
+                body.endsWith("Test Primary " + i));
             transaction.commit();
             transaction.close();
         }
@@ -219,7 +219,7 @@ public class FlumeEmbeddedAppenderTest {
 
 
         for (int i = 0; i < 10; ++i) {
-            StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Message "
+ i, "Test");
+            StructuredDataMessage msg = new StructuredDataMessage("Test", "Test Alternate
" + i, "Test");
             EventLogger.logEvent(msg);
         }
         for (int i = 0; i < 10; ++i) {
@@ -230,7 +230,7 @@ public class FlumeEmbeddedAppenderTest {
             Assert.assertNotNull(event);
             String body = getBody(event);
             Assert.assertTrue("Channel contained event, but not expected message. Received:
" + body,
-                body.endsWith("Test Message " + i));
+                body.endsWith("Test Alternate " + i));
             transaction.commit();
             transaction.close();
         }



Mime
View raw message