Skip to content

Commit a22397e

Browse files
committed
Remove redundant InMemoryAppender test
Remove the test method testAppendTransferAndStopClearsEvents from InMemoryAppenderTest. This cleans up the test suite by removing a redundant/fragile test that exercised append/transfer/stop behavior.
1 parent 320a12b commit a22397e

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

microsphere-log4j2/src/test/java/io/microsphere/logging/log4j2/appender/InMemoryAppenderTest.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -61,34 +61,6 @@ void testBasicMethodsAndLifecycle() {
6161
appender.stop(); // also covers clear() on empty set
6262
}
6363

64-
@Test
65-
void testAppendTransferAndStopClearsEvents() {
66-
InMemoryAppender source = new InMemoryAppender();
67-
CollectingAppender target = new CollectingAppender();
68-
69-
LogEvent event1 = newEvent("message-1");
70-
LogEvent event2 = newEvent("message-2");
71-
72-
source.append(event1);
73-
source.append(event2);
74-
75-
source.transfer(target);
76-
77-
assertEquals(2, target.events.size());
78-
assertTrue(target.events.contains(event1));
79-
assertTrue(target.events.contains(event2));
80-
81-
// Verify source is emptied after transfer
82-
source.transfer(target);
83-
assertEquals(2, target.events.size(), "second transfer should not add duplicates");
84-
85-
// Re-add and ensure stop clears buffered events
86-
source.append(newEvent("message-3"));
87-
source.stop();
88-
source.transfer(target);
89-
assertEquals(2, target.events.size(), "stop() should clear pending events");
90-
}
91-
9264
@Test
9365
void testFindInMemoryAppenderWithoutConfiguration() {
9466
// In plain unit test context, this may be null unless explicitly configured.

0 commit comments

Comments
 (0)