Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant for consumer timeout queue argument #206

Merged
merged 2 commits into from
Jun 21, 2023
Merged

Constant for consumer timeout queue argument #206

merged 2 commits into from
Jun 21, 2023

Conversation

Zerpet
Copy link
Contributor

@Zerpet Zerpet commented Jun 21, 2023

Documentation to queue argument constants was missing links to the
constant themselves. Go Doc allows to link to a specific symbol using
squared brackets.

Added as well a constant for SAC in CQ and QQ.

Fixes #201

Documentation to queue argument constants was missing links to the
constant themselves. Go Doc allows to link to a specific symbol using
squared brackets.

Added as well a constant for SAC in CQ and QQ.

Signed-off-by: Aitor Pérez Cedres <[email protected]>
@Zerpet Zerpet self-assigned this Jun 21, 2023
@Zerpet Zerpet added this to the 1.9.0 milestone Jun 21, 2023
Reported in https://github.com/rabbitmq/amqp091-go/actions/runs/5333022714/jobs/9662961511

```
panic: runtime error: invalid memory address or nil pointer dereference
	panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7e012c]

goroutine 3810 [running]:
github.com/rabbitmq/amqp091-go.(*Connection).IsClosed(...)
	D:/a/amqp091-go/amqp091-go/connection.go:455
github.com/rabbitmq/amqp091-go.(*Connection).Close(0x0)
	D:/a/amqp091-go/amqp091-go/connection.go:388 +0x4c
panic({0x86a960, 0xb32080})
	C:/hostedtoolcache/windows/go/1.20.5/x64/src/runtime/panic.go:890 +0x263
github.com/rabbitmq/amqp091-go.(*Connection).ConnectionState(...)
	D:/a/amqp091-go/amqp091-go/connection.go:317
github.com/rabbitmq/amqp091-go.TestTLSHandshake.func2()
	D:/a/amqp091-go/amqp091-go/tls_test.go:111 +0x27b
created by github.com/rabbitmq/amqp091-go.TestTLSHandshake
	D:/a/amqp091-go/amqp091-go/tls_test.go:104 +0x3e6
exit status 2
```

If DialTLS returns an error, c will be nil, causing a panic later on in
c.ConnectionState()

Signed-off-by: Aitor Pérez Cedres <[email protected]>
@@ -66,7 +66,7 @@ func (s *tlsServer) Serve(t *testing.T) {
}

func startTLSServer(t *testing.T, cfg *tls.Config) tlsServer {
l, err := tls.Listen("tcp", "127.0.0.1:0", cfg)
l, err := tls.Listen("tcp", "127.0.0.1:3456", cfg)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is necessary, but it seems to resolve flakes with tests in Windows container.

@Zerpet Zerpet merged commit 4f223e6 into main Jun 21, 2023
@Zerpet Zerpet deleted the issue-201 branch June 21, 2023 12:58
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.

Add a constant to set consumer timeout as queue argument
1 participant