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

bug: Successful subscription with invalid protocol identifier - regression #825

Closed
romanzac opened this issue Oct 23, 2023 · 1 comment
Closed

Comments

@romanzac
Copy link
Collaborator

romanzac commented Oct 23, 2023

Problem

This test was working two weeks ago. When I set and use unknown value for FilterSubscribeID

const FilterSubscribeID_Incorrect1 = libp2pProtocol.ID("/vac/waku/filter-subscribe/abcd")

The lightNode.Subscribe() call should fail with an error. It is not the case for now.

Steps to reproduce the behavior

Checkout branch:
"chore(filterV2)-test-updates"
Run the test:
go test -run ^TestFilterSuite$ -testify.m TestIncorrectSubscribeIdentifier

Expected behavior

Subscribe request with FilterSubscribeID_Incorrect1 should fail with an error.

Logs

go test -run ^TestFilterSuite$ -testify.m TestIncorrectSubscribeIdentifier
2023-10-23T20:47:45.697+0800 INFO gowaku.filterv2-lightnode filter/client.go:85 filter-push protocol started
2023-10-23T20:47:45.789+0800 INFO gowaku.relay relay/waku_relay.go:131 Relay protocol started
2023-10-23T20:47:45.789+0800 INFO gowaku.relay relay/waku_relay.go:328 subscribing to {"pubsubTopic": "/waku/2/go/filter/test", "contenTopics": []}
2023-10-23T20:47:45.789+0800 INFO gowaku.relay relay/waku_relay.go:220 subscribing to topic {"topic": "/waku/2/go/filter/test"}
2023-10-23T20:47:45.789+0800 INFO gowaku.filterv2-fullnode filter/server.go:82 filter-subscriber protocol started
2023-10-23T20:47:45.789+0800 INFO gowaku filter/filter_test.go:1015 Executing {"testName": "TestIncorrectSubscribeIdentifier"}
2023-10-23T20:47:45.906+0800 INFO gowaku.filterv2-lightnode filter/client.go:85 filter-push protocol started
2023-10-23T20:47:46.108+0800 INFO gowaku.relay relay/waku_relay.go:131 Relay protocol started
2023-10-23T20:47:46.108+0800 INFO gowaku.relay relay/waku_relay.go:328 subscribing to {"pubsubTopic": "/waku/2/go/filter/test", "contenTopics": []}
2023-10-23T20:47:46.108+0800 INFO gowaku.relay relay/waku_relay.go:220 subscribing to topic {"topic": "/waku/2/go/filter/test"}
2023-10-23T20:47:46.108+0800 INFO gowaku.filterv2-fullnode filter/server.go:82 filter-subscriber protocol started
2023-10-23T20:47:46.108+0800 INFO gowaku filter/filter_test.go:710 Existing protocols {"ID": "/vac/waku/filter-subscribe/abcd"}
2023-10-23T20:47:46.148+0800 INFO gowaku.filterv2-fullnode filter/server.go:118 received request {"peer": "QmTZf8ak72XqxFvKPRGma87Q6XKCdXPpeq1T9T9WYVStY8", "requestID": "d614000b4f85f66436cfa9f0e686239bbd8ef03f5044f534d0f4e13b7030b515", "requestType": "SUBSCRIBE"}
2023-10-23T20:47:46.148+0800 INFO gowaku filter/filter_test.go:715 Subscribe result {"count": "1"}
2023-10-23T20:47:46.148+0800 INFO gowaku filter/filter_test.go:1019 Finished executing {"testName": "TestIncorrectSubscribeIdentifier"}
2023-10-23T20:47:46.148+0800 INFO pubsub go-libp2p-pubsub@v0.9.3/pubsub.go:671 pubsub processloop shutting down
2023-10-23T20:47:46.148+0800 ERROR gowaku.filterv2-lightnode filter/client.go:197 receiving FilterSubscribeResponse {"error": "stream reset"}
2023-10-23T20:47:46.148+0800 ERROR gowaku.filterv2-lightnode filter/client.go:570 could not unsubscribe from peer {"peerID": "QmQTYHWE8z4J6cj5pER2e1Eg79ZYbNKeVyhiL522YjGP23", "error": "stream reset"}
2023-10-23T20:47:46.148+0800 WARN gowaku.filterv2-lightnode filter/client.go:100 unsubscribing from full nodes {"error": "stream reset", "peerID": "QmQTYHWE8z4J6cj5pER2e1Eg79ZYbNKeVyhiL522YjGP23"}
--- FAIL: TestFilterSuite (0.53s)
--- FAIL: TestFilterSuite/TestIncorrectSubscribeIdentifier (0.53s)
filter_test.go:716:
Error Trace: /Users/roman/sources/waku-org/go-waku/waku/v2/protocol/filter/filter_test.go:716
Error: An error is expected but got nil.
Test: TestFilterSuite/TestIncorrectSubscribeIdentifier
FAIL
exit status 1
FAIL github.com/waku-org/go-waku/waku/v2/protocol/filter 1.221s

@romanzac
Copy link
Collaborator Author

Test redesigned according to discussion in #811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant