From 1781efa8b910be43a0c525ba53ea5e62ae7fee9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Gamboa?= Date: Sun, 18 Oct 2026 18:44:56 -0300 Subject: [PATCH] test: disable the framework queue runner in the queued notification tests These tests switch queue.default to the database connection and restart the app, disabling only the app's own queue runners. The framework's goravel:queue runner then starts too and consumes the same queue concurrently with the test's worker (or before readQueuedNotificationItem reads the job), so the job row can still exist when the test counts it, or be gone when it reads it. Disable goravel:queue like the other notification, broadcast and multi-queue tests already do. --- tests/feature/notification_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/feature/notification_test.go b/tests/feature/notification_test.go index 9b72995..cbe47ee 100644 --- a/tests/feature/notification_test.go +++ b/tests/feature/notification_test.go @@ -85,7 +85,7 @@ func (s *NotificationTestSuite) TestSendNowDatabaseNotification() { // background runner. scope, err := tests.OverrideConfig(map[string]any{ "queue.default": "database", - "app.disabled_runners": []string{"app:queue:database", "app:queue:test"}, + "app.disabled_runners": []string{"goravel:queue", "app:queue:database", "app:queue:test"}, }) s.Require().NoError(err) defer func() { s.NoError(scope.Restore()) }() @@ -110,7 +110,7 @@ func (s *NotificationTestSuite) TestSendQueuedDatabaseNotification() { scope, err := tests.OverrideConfig(map[string]any{ "queue.default": "database", - "app.disabled_runners": []string{"app:queue:database", "app:queue:test"}, + "app.disabled_runners": []string{"goravel:queue", "app:queue:database", "app:queue:test"}, }) s.Require().NoError(err) defer func() { s.NoError(scope.Restore()) }() @@ -529,7 +529,7 @@ func (s *NotificationTestSuite) extendFlakyChannel(name string, failUntil int, a func (s *NotificationTestSuite) TestSendQueuedNotificationWithTriesAndBackoff() { scope, err := tests.OverrideConfig(map[string]any{ "queue.default": "database", - "app.disabled_runners": []string{"app:queue:database", "app:queue:test"}, + "app.disabled_runners": []string{"goravel:queue", "app:queue:database", "app:queue:test"}, }) s.Require().NoError(err) defer func() { s.NoError(scope.Restore()) }() @@ -619,7 +619,7 @@ func (s *NotificationTestSuite) TestSendQueuedNotificationWithoutTriesFallsBackT func (s *NotificationTestSuite) TestSendQueuedNotificationBackoffWithoutTriesSerialized() { scope, err := tests.OverrideConfig(map[string]any{ "queue.default": "database", - "app.disabled_runners": []string{"app:queue:database", "app:queue:test"}, + "app.disabled_runners": []string{"goravel:queue", "app:queue:database", "app:queue:test"}, }) s.Require().NoError(err) defer func() { s.NoError(scope.Restore()) }() @@ -681,7 +681,7 @@ func (s *NotificationTestSuite) TestSendQueuedNotificationBackoffWithoutTriesFal func (s *NotificationTestSuite) TestSendQueuedOrderFailedCapturesRetryPolicy() { scope, err := tests.OverrideConfig(map[string]any{ "queue.default": "database", - "app.disabled_runners": []string{"app:queue:database", "app:queue:test"}, + "app.disabled_runners": []string{"goravel:queue", "app:queue:database", "app:queue:test"}, }) s.Require().NoError(err) defer func() { s.NoError(scope.Restore()) }() @@ -699,7 +699,7 @@ func (s *NotificationTestSuite) TestSendQueuedOrderFailedCapturesRetryPolicy() { func (s *NotificationTestSuite) TestSendQueuedNotificationRetriesTransientFailure() { scope, err := tests.OverrideConfig(map[string]any{ "queue.default": "database", - "app.disabled_runners": []string{"app:queue:database", "app:queue:test"}, + "app.disabled_runners": []string{"goravel:queue", "app:queue:database", "app:queue:test"}, }) s.Require().NoError(err) defer func() { s.NoError(scope.Restore()) }()