diff --git a/core/queue/test/queue_test.dart b/core/queue/test/queue_test.dart index e3e94baf..e784f3cf 100644 --- a/core/queue/test/queue_test.dart +++ b/core/queue/test/queue_test.dart @@ -117,19 +117,22 @@ void main() { print("sendMessage was not called"); } - // Print fired events for debugging - print("Fired events:"); - for (var event in firedEvents) { + // Filter out EmptyEvents and print fired events for debugging + final significantEvents = + firedEvents.where((event) => event is! EmptyEvent).toList(); + print("Fired events (excluding EmptyEvents):"); + for (var event in significantEvents) { print("${event.runtimeType}: ${event.toString()}"); } // Verify fired events - expect(firedEvents, isNotEmpty, reason: "No events were fired"); - expect(firedEvents.where((event) => event is JobQueueingEvent).length, + expect(significantEvents, isNotEmpty, + reason: "No significant events were fired"); + expect(significantEvents.where((event) => event is JobQueueingEvent).length, equals(1), reason: "JobQueueingEvent was not fired exactly once"); - expect( - firedEvents.where((event) => event is JobQueuedEvent).length, equals(1), + expect(significantEvents.where((event) => event is JobQueuedEvent).length, + equals(1), reason: "JobQueuedEvent was not fired exactly once"); // Verify that no other methods were called on mq