-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: remove jsonrpc client in favor of grpc client #578
Conversation
Co-authored-by: Gustavo Inacio <[email protected]> Signed-off-by: pedro bufulin <[email protected]> Signed-off-by: Gustavo Inacio <[email protected]>
One test is running forever, could you check if you are properly aborting the task? |
.github/workflows/tests.yml
Outdated
clippy: | ||
- name: Start mock server | ||
run: | | ||
cargo run --bin mock_tap_aggregator_server_runner & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I've added this so there is less changes and boilerplate code when testing. Otherwise, a lot of tests would require running the mocked gRPC server and shutting it down in the test function. This is because unlike
HttpClientBuilder::defaultthat was being used before,
TapAggregatorClientdoes not have a builder and just uses
connect()`. And this fails the tests because there was no server in the dummy endpoint being used.
The other option besides this, is run the Mock in each test that needs it, and shut it down. Similarly to what is done with sender_account.stop_and_wait
Since there are many tests that require this, I think this approach is simpler
The test that hangs is in |
@@ -1256,10 +1258,6 @@ pub mod tests { | |||
message_receiver.recv().await.unwrap(), | |||
SenderAccountMessage::UpdateReceiptFees(_, ReceiptFees::RavRequestResponse(_)) | |||
)); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to do handle.abort()
here, otherwise the test is gonna run forever.
When you close an allocation, it tries to create a last_rav by aggregating all receipts until they are all aggregated. It looks like when you call We were previously mocking the response for the aggregator server, but since we cannot mock HTTP responses with gRPC you need to fix the test to use our new aggregator. |
I found this, which seems that we can use to mock the gRPC aggregator: |
Closed in favor of #583 |
No description provided.