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

[FIXED] test: Fix panic for non-existent RAFT node/group #6524

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

MauriceVanVeen
Copy link
Member

Fixes the following test panic:

=== FAIL: server TestJetStreamClusterRecreateConsumerFromMetaSnapshot (4.18s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0xc4a8b3]
goroutine 68737 [running]:
testing.tRunner.func1.2({0x134cb80, 0x20093e0})
    /usr/local/go/src/testing/testing.go:1734 +0x21c
testing.tRunner.func1()
    /usr/local/go/src/testing/testing.go:1737 +0x35e
panic({0x134cb80?, 0x20093e0?})
    /usr/local/go/src/runtime/panic.go:787 +0x132
github.com/nats-io/nats-server/v2/server.TestJetStreamClusterRecreateConsumerFromMetaSnapshot.func3()
    /workspace/build/buildkite/synadia/nats-server-dev/server/jetstream_cluster_1_test.go:7790 +0xd3
github.com/nats-io/nats-server/v2/server.checkForErr(0x77359400, 0x1dcd6500, 0xc0011d5ed0)
    /workspace/build/buildkite/synadia/nats-server-dev/server/server_test.go:48 +0x94
github.com/nats-io/nats-server/v2/server.checkFor({0x1749f00, 0xc00037c700}, 0x77359400, 0x1dcd6500, 0xc0011d5ed0)
    /workspace/build/buildkite/synadia/nats-server-dev/server/server_test.go:59 +0x48
github.com/nats-io/nats-server/v2/server.TestJetStreamClusterRecreateConsumerFromMetaSnapshot(0xc00037c700)
    /workspace/build/buildkite/synadia/nats-server-dev/server/jetstream_cluster_1_test.go:7781 +0x6db
testing.tRunner(0xc00037c700, 0x15530e8)
    /usr/local/go/src/testing/testing.go:1792 +0xf4
created by testing.(*T).Run in goroutine 1
    /usr/local/go/src/testing/testing.go:1851 +0x413

Signed-off-by: Maurice van Veen [email protected]

@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner February 18, 2025 17:30
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 5d33982 into main Feb 18, 2025
5 checks passed
@derekcollison derekcollison deleted the maurice/test-panic-meta-snapshot branch February 18, 2025 17:55
@wallyqs wallyqs changed the title Test: fix panic for non-existent RAFT node/group [TEST] Fix panic for non-existent RAFT node/group Feb 21, 2025
@wallyqs wallyqs changed the title [TEST] Fix panic for non-existent RAFT node/group [FIXED] test: Fix panic for non-existent RAFT node/group Feb 21, 2025
neilalexander added a commit that referenced this pull request Feb 21, 2025
Includes the following:

- #6524
- #6525
- #6526
- #5424
- #6565
- #6532

Signed-off-by: Neil Twigg <[email protected]>
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.

3 participants