Skip to content

test: add queue receive timeout integration coverage (framework#1568) - #157

Closed
goravel-coder wants to merge 1 commit into
masterfrom
bowen/test-pr-1568-queue-timeout
Closed

goravel-coder wants to merge 1 commit into
masterfrom
bowen/test-pr-1568-queue-timeout

Conversation

@goravel-coder

Copy link
Copy Markdown
Contributor

Summary

  • Add integration coverage proving queue.connections.<connection>.timeout bounds the blocking receive a DriverWithReceive worker performs.
  • Scaffold the database connection with "timeout": 5 so the example demonstrates the new option.
  • Pin github.com/goravel/framework to the PR #1568 commit so the suite exercises the new behavior end-to-end.

Why

This adds integration coverage for goravel/framework#1568, which makes a queue worker's blocking receive timeout configurable per connection. Previously the wait was fixed, so receive-based drivers could not tune how long a worker blocks before polling again.

The example now documents the new option and pins the framework to the PR commit, so the timeout is exercised through a real worker against a DriverWithReceive fake that records the deadline it is handed.

// config/queue.go
"database": map[string]any{
	"driver":     "database",
	"connection": "sqlite",
	"queue":      "default",
	"concurrent": 5,
	// timeout is the number of seconds to wait for a blocking receive, e.g. 5 or "1s".
	// Only affects receive-based (DriverWithReceive) connections.
	"timeout": 5,
	// retry_after is the number of seconds a job is reserved for before a
	// crashed worker's reservation expires and the job is recovered by
	// other workers. It must exceed the maximum job runtime.
	"retry_after": 60,
},

@goravel-coder
goravel-coder requested a review from a team as a code owner October 3, 2026 13:27
@hwbrzzl hwbrzzl closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants