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

chore(filter v2): test updates #811

Merged
merged 83 commits into from
Oct 28, 2023
Merged

Conversation

romanzac
Copy link
Collaborator

Description
Batch of new tests for Waku Filter v2.

Changes
Tests available to run:
cd go-waku/waku/v2/protocol/filter
go test

Two tests failing at the moment - corresponding issues were opened.

@status-im-auto
Copy link

status-im-auto commented Oct 17, 2023

Jenkins Builds

Click to see older builds (124)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ec2a50c #1 2023-10-17 10:18:17 ~2 min nix-flake 📄log
✖️ ec2a50c #1 2023-10-17 10:18:44 ~2 min tests 📄log
✔️ ec2a50c #1 2023-10-17 10:18:57 ~2 min linux 📦deb
✖️ ec2a50c #1 2023-10-17 10:19:16 ~3 min tests 📄log
✔️ ec2a50c #1 2023-10-17 10:20:32 ~4 min android 📦tgz
✔️ ec2a50c #1 2023-10-17 10:20:35 ~4 min ios 📦tgz
✔️ cdf3571 #2 2023-10-17 18:17:08 ~1 min linux 📦deb
✔️ cdf3571 #2 2023-10-17 18:17:58 ~1 min nix-flake 📄log
✖️ cdf3571 #2 2023-10-17 18:18:19 ~2 min tests 📄log
✖️ cdf3571 #2 2023-10-17 18:19:00 ~2 min tests 📄log
✔️ cdf3571 #2 2023-10-17 18:19:18 ~3 min android 📦tgz
✔️ cdf3571 #2 2023-10-17 18:19:30 ~3 min ios 📦tgz
✔️ 5e25d4d #3 2023-10-20 05:49:50 ~1 min nix-flake 📄log
✖️ 5e25d4d #3 2023-10-20 05:50:40 ~2 min tests 📄log
✖️ 5e25d4d #3 2023-10-20 05:50:40 ~2 min tests 📄log
✔️ 5e25d4d #3 2023-10-20 05:51:02 ~3 min linux 📦deb
✔️ 5e25d4d #3 2023-10-20 05:52:12 ~4 min android 📦tgz
✔️ 5e25d4d #3 2023-10-20 05:52:38 ~4 min ios 📦tgz
✔️ be68915 #4 2023-10-20 05:51:45 ~1 min nix-flake 📄log
✖️ be68915 #4 2023-10-20 05:51:49 ~1 min tests 📄log
✖️ be68915 #4 2023-10-20 05:51:59 ~1 min tests 📄log
✔️ be68915 #4 2023-10-20 05:52:05 ~1 min linux 📦deb
✔️ be68915 #4 2023-10-20 05:52:42 ~4 min ios 📦tgz
✔️ be68915 #4 2023-10-20 05:55:20 ~3 min android 📦tgz
✖️ e6fd86d #5 2023-10-20 05:54:12 ~18 sec tests 📄log
✖️ e6fd86d #5 2023-10-20 05:55:17 ~1 min tests 📄log
✔️ e6fd86d #5 2023-10-20 05:55:47 ~1 min nix-flake 📄log
✔️ e6fd86d #5 2023-10-20 05:56:18 ~2 min linux 📦deb
✔️ e6fd86d #5 2023-10-20 05:57:35 ~3 min ios 📦tgz
✖️ 9f1ad7f #6 2023-10-20 05:54:38 ~18 sec tests 📄log
✔️ 9f1ad7f #6 2023-10-20 05:58:02 ~3 min ios 📦tgz
✖️ 8a0d0c1 #7 2023-10-20 05:55:53 ~17 sec tests 📄log
✖️ 8a0d0c1 #6 2023-10-20 05:56:42 ~1 min tests 📄log
✖️ 8a0d0c1 #7 2023-10-20 05:57:05 ~18 sec tests 📄log
✔️ 8a0d0c1 #6 2023-10-20 05:57:18 ~56 sec linux 📦deb
✔️ 8a0d0c1 #6 2023-10-20 05:57:41 ~1 min nix-flake 📄log
✔️ 8a0d0c1 #5 2023-10-20 05:59:34 ~4 min android 📦tgz
✔️ 8a0d0c1 #7 2023-10-20 06:00:22 ~4 min ios 📦tgz
✖️ 5cfb269 #8 2023-10-20 05:57:43 ~17 sec tests 📄log
✖️ 5cfb269 #8 2023-10-20 05:57:47 ~18 sec tests 📄log
✔️ 5cfb269 #7 2023-10-20 05:58:25 ~1 min linux 📦deb
✔️ 5cfb269 #7 2023-10-20 05:59:34 ~1 min nix-flake 📄log
✔️ 5cfb269 #8 2023-10-20 06:03:04 ~5 min ios 📦tgz
✖️ 2fae323 #9 2023-10-20 05:58:47 ~18 sec tests 📄log
✖️ 2fae323 #9 2023-10-20 05:58:53 ~21 sec tests 📄log
✔️ 2fae323 #8 2023-10-20 05:59:32 ~1 min linux 📦deb
✔️ 2fae323 #8 2023-10-20 06:01:28 ~1 min nix-flake 📄log
✔️ 2fae323 #9 2023-10-20 06:01:58 ~3 min ios 📦tgz
✔️ 2fae323 #6 2023-10-20 06:02:58 ~3 min android 📦tgz
✔️ b5715d6 #9 2023-10-20 14:32:09 ~1 min nix-flake 📄log
✔️ b5715d6 #9 2023-10-20 14:32:34 ~2 min linux 📦deb
✖️ b5715d6 #10 2023-10-20 14:32:39 ~2 min tests 📄log
✔️ b5715d6 #7 2023-10-20 14:34:33 ~4 min android 📦tgz
✔️ b5715d6 #10 2023-10-20 14:34:55 ~4 min ios 📦tgz
✖️ b5715d6 #10 2023-10-20 14:37:53 ~7 min tests 📄log
✔️ 8fca6a6 #10 2023-10-20 14:49:40 ~1 min nix-flake 📄log
✖️ 8fca6a6 #11 2023-10-20 14:50:05 ~2 min tests 📄log
✔️ 8fca6a6 #10 2023-10-20 14:50:07 ~2 min linux 📦deb
✖️ 8fca6a6 #11 2023-10-20 14:50:48 ~3 min tests 📄log
✔️ 8fca6a6 #11 2023-10-20 14:51:23 ~3 min ios 📦tgz
✔️ 8fca6a6 #8 2023-10-20 14:51:44 ~4 min android 📦tgz
✖️ 5e89620 #12 2023-10-23 07:43:46 ~26 sec tests 📄log
✔️ 5e89620 #11 2023-10-23 07:44:30 ~1 min linux 📦deb
✖️ 5e89620 #12 2023-10-23 07:44:41 ~1 min tests 📄log
✔️ 5e89620 #11 2023-10-23 07:45:12 ~1 min nix-flake 📄log
✔️ 5e89620 #9 2023-10-23 07:47:07 ~3 min android 📦tgz
✔️ 5e89620 #12 2023-10-23 07:47:36 ~4 min ios 📦tgz
✔️ 077c534 #12 2023-10-23 07:46:03 ~1 min linux 📦deb
✖️ 077c534 #13 2023-10-23 07:46:07 ~1 min tests 📄log
✖️ 077c534 #13 2023-10-23 07:46:53 ~1 min tests 📄log
✔️ 077c534 #12 2023-10-23 07:47:12 ~1 min nix-flake 📄log
✔️ 077c534 #13 2023-10-23 07:49:44 ~4 min ios 📦tgz
✔️ 077c534 #10 2023-10-23 07:52:52 ~5 min android 📦tgz
✖️ 077c534 #15 2023-10-23 21:39:35 ~1 min tests 📄log
✖️ dca86dc #14 2023-10-23 12:43:05 ~1 min tests 📄log
✔️ dca86dc #13 2023-10-23 12:43:10 ~1 min linux 📦deb
✖️ dca86dc #14 2023-10-23 12:43:15 ~1 min tests 📄log
✔️ dca86dc #13 2023-10-23 12:43:52 ~1 min nix-flake 📄log
✔️ dca86dc #11 2023-10-23 12:45:34 ~3 min android 📦tgz
✔️ dca86dc #14 2023-10-23 12:46:06 ~4 min ios 📦tgz
✖️ dca86dc #16 2023-10-23 21:43:10 ~1 min tests 📄log
✖️ dca86dc #17 2023-10-23 21:44:20 ~1 min tests 📄log
✔️ 884f068 #14 2023-10-24 08:29:50 ~1 min nix-flake 📄log
✔️ 884f068 #18 2023-10-24 08:29:52 ~1 min tests 📄log
✔️ 884f068 #15 2023-10-24 08:30:07 ~2 min tests 📄log
✔️ 884f068 #14 2023-10-24 08:30:14 ~2 min linux 📦deb
✔️ 884f068 #12 2023-10-24 08:31:39 ~3 min android 📦tgz
✔️ 884f068 #15 2023-10-24 08:32:14 ~4 min ios 📦tgz
✔️ acedc00 #15 2023-10-24 09:02:45 ~1 min linux 📦deb
✔️ acedc00 #19 2023-10-24 09:03:24 ~1 min tests 📄log
✔️ acedc00 #15 2023-10-24 09:03:26 ~1 min nix-flake 📄log
✔️ acedc00 #16 2023-10-24 09:03:46 ~2 min tests 📄log
✔️ acedc00 #13 2023-10-24 09:05:10 ~3 min android 📦tgz
✔️ acedc00 #16 2023-10-24 09:05:18 ~3 min ios 📦tgz
✔️ 155130c #16 2023-10-24 09:36:51 ~1 min linux 📦deb
✖️ 155130c #20 2023-10-24 09:37:12 ~1 min tests 📄log
✔️ 155130c #16 2023-10-24 09:37:44 ~1 min nix-flake 📄log
✔️ 155130c #14 2023-10-24 09:39:11 ~3 min android 📦tgz
✔️ 155130c #17 2023-10-24 09:39:38 ~3 min ios 📦tgz
✖️ 155130c #17 2023-10-24 09:41:29 ~5 min tests 📄log
✔️ d5c5bd2 #17 2023-10-25 06:12:25 ~1 min linux 📦deb
✔️ d5c5bd2 #17 2023-10-25 06:13:15 ~1 min nix-flake 📄log
✔️ d5c5bd2 #21 2023-10-25 06:13:22 ~1 min tests 📄log
✔️ d5c5bd2 #18 2023-10-25 06:14:38 ~3 min tests 📄log
✔️ d5c5bd2 #15 2023-10-25 06:15:01 ~3 min android 📦tgz
✔️ d5c5bd2 #18 2023-10-25 06:15:49 ~4 min ios 📦tgz
✔️ 0baef5b #18 2023-10-25 13:25:22 ~1 min linux 📦deb
✔️ 0baef5b #18 2023-10-25 13:26:18 ~2 min nix-flake 📄log
✔️ 0baef5b #22 2023-10-25 13:27:04 ~2 min tests 📄log
✔️ 0baef5b #19 2023-10-25 13:27:36 ~3 min tests 📄log
✔️ 0baef5b #16 2023-10-25 13:28:10 ~4 min android 📦tgz
✔️ 0baef5b #19 2023-10-25 13:28:56 ~4 min ios 📦tgz
✔️ e287973 #19 2023-10-26 01:43:10 ~1 min linux 📦deb
✔️ e287973 #19 2023-10-26 01:43:53 ~1 min nix-flake 📄log
✔️ e287973 #23 2023-10-26 01:43:58 ~1 min tests 📄log
✔️ e287973 #20 2023-10-26 01:44:22 ~2 min tests 📄log
✔️ e287973 #17 2023-10-26 01:45:46 ~3 min android 📦tgz
✔️ e287973 #20 2023-10-26 01:45:48 ~3 min ios 📦tgz
✖️ 7d34737 #21 2023-10-26 01:46:47 ~1 min tests 📄log
✔️ 7d34737 #20 2023-10-26 01:46:53 ~1 min linux 📦deb
✖️ 7d34737 #24 2023-10-26 01:46:55 ~1 min tests 📄log
✔️ 7d34737 #20 2023-10-26 01:47:34 ~1 min nix-flake 📄log
✔️ 7d34737 #18 2023-10-26 01:49:05 ~3 min android 📦tgz
✔️ 7d34737 #21 2023-10-26 01:50:00 ~4 min ios 📦tgz
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 62098a0 #21 2023-10-26 02:15:24 ~1 min linux 📦deb
✔️ 62098a0 #25 2023-10-26 02:16:09 ~1 min tests 📄log
✔️ 62098a0 #21 2023-10-26 02:16:15 ~1 min nix-flake 📄log
✔️ 62098a0 #22 2023-10-26 02:16:31 ~2 min tests 📄log
✔️ 62098a0 #19 2023-10-26 02:17:51 ~3 min android 📦tgz
✔️ 62098a0 #22 2023-10-26 02:18:49 ~4 min ios 📦tgz
✔️ 198925e #22 2023-10-27 02:02:43 ~1 min linux 📦deb
✔️ 198925e #22 2023-10-27 02:03:29 ~1 min nix-flake 📄log
✔️ 198925e #26 2023-10-27 02:03:34 ~1 min tests 📄log
✔️ 198925e #23 2023-10-27 02:03:53 ~2 min tests 📄log
✔️ 198925e #20 2023-10-27 02:05:28 ~3 min android 📦tgz
✔️ 198925e #23 2023-10-27 02:05:55 ~4 min ios 📦tgz

chaitanyaprem and others added 2 commits October 17, 2023 11:15
…t-updates

# Conflicts:
#	waku/v2/protocol/filter/client.go
#	waku/v2/protocol/filter/options.go
Copy link
Member

@richard-ramos richard-ramos left a comment

Choose a reason for hiding this comment

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

Left some nits/suggestions

waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
waku/v2/protocol/filter/filter_test.go Outdated Show resolved Hide resolved
romanzac and others added 12 commits October 20, 2023 13:47
Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>
Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>
fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>
Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>
Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>
Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>
Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>
@chaitanyaprem
Copy link
Collaborator

@romanzac , Was going through the failed test TestIncorrectSubscribeIdentifier and had noticed that there is no reason for this test to fail. As the filterLightNode opens a stream with the correct subscribe protocol as and when we invoke the subscribe API.

conn, err := wf.h.NewStream(ctx, params.selectedPeer, FilterSubscribeID_v20beta1)

So even if we add a wrong protocol to the client, that would just be an additional protocol supported by this lightClient and does not affect how it communicates with filter node.
If you want to simulate a test where a wrong protocolID is used for subscribe, then you would have to initiate FilterClient itself using libp2p API directly and then form a subscribe message and send it over a stream opened with the incorrect protocolID.

@chaitanyaprem
Copy link
Collaborator

@richard-ramos , for some reason Test for WakuMetadata proto seems to also fail.
Could it be running into some sort of special condition where the test fails? Would be better to rootcause and fix it.

@richard-ramos
Copy link
Member

@richard-ramos , for some reason Test for WakuMetadata proto seems to also fail.
Could it be running into some sort of special condition where the test fails? Would be better to rootcause and fix it.

Fixed in #826

@romanzac
Copy link
Collaborator Author

@chaitanyaprem Filter tests are passing on my side. I have followed your suggestions for "TestIncorrectSubscribeIdentifier". It is working, although I had to go deep into the stack and copied a lot of code. Not sure, if by chance you would find beneficial to have subscribe protocol identifier changeable at higher levels. Or perhaps Peerstore().RemoveProtocols() might work ?

@chaitanyaprem
Copy link
Collaborator

@chaitanyaprem Filter tests are passing on my side. I have followed your suggestions for "TestIncorrectSubscribeIdentifier". It is working, although I had to go deep into the stack and copied a lot of code. Not sure, if by chance you would find beneficial to have subscribe protocol identifier changeable at higher levels. Or perhaps Peerstore().RemoveProtocols() might work ?

Actually RemoveProtocols might have worked, slipped my mind. Also, do note that this is a kind of test you are trying to do which may sometimes require emulating lot of client code(as you are trying to simulate a scenario which would not be possible with existing client implementations)

@chaitanyaprem
Copy link
Collaborator

Also looks like #836 seems to have slipped past your tests and mine.
Might be a good idea to check the scope to see such scenarios are covered.

Haven't reviewed all your tests though, so not sure if it is already covered. :)

@romanzac
Copy link
Collaborator Author

Also looks like #836 seems to have slipped past your tests and mine. Might be a good idea to check the scope to see such scenarios are covered.

Haven't reviewed all your tests though, so not sure if it is already covered. :)

Do you mean in general, something is called with initialized variable, but no specific values set ? I will come to these later.

@romanzac
Copy link
Collaborator Author

@chaitanyaprem Filter tests are passing on my side. I have followed your suggestions for "TestIncorrectSubscribeIdentifier". It is working, although I had to go deep into the stack and copied a lot of code. Not sure, if by chance you would find beneficial to have subscribe protocol identifier changeable at higher levels. Or perhaps Peerstore().RemoveProtocols() might work ?

Actually RemoveProtocols might have worked, slipped my mind. Also, do note that this is a kind of test you are trying to do which may sometimes require emulating lot of client code(as you are trying to simulate a scenario which would not be possible with existing client implementations)

I will reuse those "copied" funcs in later tests where I go down to the level of invalid payloads.

BTW: I have tried RemoveProtocols and it didn't work for me. I see from the code subscribe related protocol identifier is not part of a live node instance. It is part of the code only. Could you confirm for me please ?

@romanzac
Copy link
Collaborator Author

Guys, I wish we can close this PR by Friday this week. Its scope is too large. I will create smaller PRs starting next week.

@chaitanyaprem
Copy link
Collaborator

@chaitanyaprem Filter tests are passing on my side. I have followed your suggestions for "TestIncorrectSubscribeIdentifier". It is working, although I had to go deep into the stack and copied a lot of code. Not sure, if by chance you would find beneficial to have subscribe protocol identifier changeable at higher levels. Or perhaps Peerstore().RemoveProtocols() might work ?

Actually RemoveProtocols might have worked, slipped my mind. Also, do note that this is a kind of test you are trying to do which may sometimes require emulating lot of client code(as you are trying to simulate a scenario which would not be possible with existing client implementations)

I will reuse those "copied" funcs in later tests where I go down to the level of invalid payloads.

BTW: I have tried RemoveProtocols and it didn't work for me. I see from the code subscribe related protocol identifier is not part of a live node instance. It is part of the code only. Could you confirm for me please ?

Oh right, since the protocol stream is created only when a request has to be sent which means anytime call to subscribe API will initiate a new stream with the protocol and hence not possible.

@romanzac
Copy link
Collaborator Author

May I proceed with merge to master ?

@romanzac romanzac merged commit 34b25ff into master Oct 28, 2023
10 of 11 checks passed
@romanzac romanzac deleted the chore(filterV2)-test-updates branch October 28, 2023 03:40
@richard-ramos
Copy link
Member

:( We shouldn't merge PRs that have not been approved

richard-ramos added a commit that referenced this pull request Oct 28, 2023
---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
@romanzac
Copy link
Collaborator Author

:( We shouldn't merge PRs that have not been approved

I am sorry, I've interpreted silence for one day as yes. I've announced I would like to close it by Friday and approval was not hardwired as precondition to merge. I will ping you on Discord next time.

romanzac added a commit that referenced this pull request Nov 2, 2023
* Chore(filter v2) test updates (#811)

* test: Test incorrect protocol identifiers

* fix: return errors in FilterSubscribeOption

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* test: Test incorrect protocol identifiers

* chore: rebase onto latest master

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* test: Test incorrect protocol identifiers

* fix: return errors in FilterSubscribeOption

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* Fix error during rebase

* Sync filter tests with latest master

* Refactor context initialization for test

* test: Incorrect Subscribe Identifier refactored with custom subscribe

* test: refactor into multiple files

* test: Subscribe with multiple light nodes to one full node

* test: shared mode for full node creation
- test preview Subscribe fullNode to fullNode

* test: test Subscribe fullNode to fullNode

---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>

* test: unsubscribe with single contentTopic

* test: extend test - unsubscribe with single contentTopic

* test: unsubscribe with multiple contentTopic

* test: unsubscribe with multiple pubSub/contentTopic

* test: refactor back to use waitForTimeout()

* test: unsubscribe error handling

---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
romanzac added a commit that referenced this pull request Nov 8, 2023
* Chore(filter v2) test updates (#811)

* test: Test incorrect protocol identifiers

* fix: return errors in FilterSubscribeOption

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* test: Test incorrect protocol identifiers

* chore: rebase onto latest master

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* test: Test incorrect protocol identifiers

* fix: return errors in FilterSubscribeOption

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* Fix error during rebase

* Sync filter tests with latest master

* Refactor context initialization for test

* test: Incorrect Subscribe Identifier refactored with custom subscribe

* test: refactor into multiple files

* test: Subscribe with multiple light nodes to one full node

* test: shared mode for full node creation
- test preview Subscribe fullNode to fullNode

* test: test Subscribe fullNode to fullNode

---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>

* test: unsubscribe all without content topics

* test: unsubscribe all without any filter specification

* test: move unsubscribe all tests to unsubscribe file

---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
romanzac added a commit that referenced this pull request Nov 10, 2023
* Chore(filter v2) test updates (#811)

* test: Test incorrect protocol identifiers

* fix: return errors in FilterSubscribeOption

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* test: Test incorrect protocol identifiers

* chore: rebase onto latest master

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* test: Test incorrect protocol identifiers

* fix: return errors in FilterSubscribeOption

* test: Test incorrect push identifier added
- test incorrect subscribe identifier separated

* test: Test Ping failure after unsubscription

* test: Test PubSub with single content topic

* test: Simplify test PubSub with single content topic

* test: Test with single pubsub and multiple content topics

* test: Test with multiple PubSub and multiple contentTopic

* test: Test with multiple overlaping contentTopics
- test contentTopics limit

* test: refactor tests to fix concurrent run errors

* test: Test subscription refresh

* test: Test error handling for subscribe

* test: Test subscription to multiple full nodes

* update test to fix #804

* Update waku/v2/protocol/filter/filter_test.go

Combine log messages

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Delete commented - temporary code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

fmt.Sprintf instead of "+" suffix => more performance and beauty

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Adjust comment with code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Combine multiple related log entries into one.

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Align comment with the code

Co-authored-by: richΛrd <info@richardramos.me>

* Update waku/v2/protocol/filter/filter_test.go

Use fmt.Sprintf() instead of "+" for more beauty and speed

Co-authored-by: richΛrd <info@richardramos.me>

* test: refactor tests with prepareData()

* Fix error during rebase

* Sync filter tests with latest master

* Refactor context initialization for test

* test: Incorrect Subscribe Identifier refactored with custom subscribe

* test: refactor into multiple files

* test: Subscribe with multiple light nodes to one full node

* test: shared mode for full node creation
- test preview Subscribe fullNode to fullNode

* test: test Subscribe fullNode to fullNode

---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>

* string generators for testing

* fix CodeQL findings

* merge variants of UTF8 String generator into one

---------

Co-authored-by: Richard Ramos <info@richardramos.me>
Co-authored-by: Prem Chaitanya Prathi <chaitanyaprem@gmail.com>
@romanzac romanzac changed the title Chore(filter v2) test updates chore(filter v2): test updates Nov 15, 2023
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.

None yet

4 participants