-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix Rust DataConsumer #1262
Fix Rust DataConsumer #1262
Conversation
### Details * [x] Rust `set_subchannels()` method was only implemented in `DirectDataConsumer` which is wrong. * [ ] Rust `DirectDataConsumer` lacks ALL methods of `DataConsumer` such as `pause()`, `closed()`, etc!!! * [x] Bonus track: Use an ordered set in `DataConsumer` in worker so `subchannels` will be always shown in numerical order (no need to sort them later in Node/Rust layer).
Issue (NOTE: FIXED)cargo fails with this:
Comments by @nazar-pc:
|
diff --git a/rust/tests/integration/direct_transport.rs b/rust/tests/integration/direct_transport.rs
index 380f3e1b3..6053de020 100644
--- a/rust/tests/integration/direct_transport.rs
+++ b/rust/tests/integration/direct_transport.rs
@@ -430,7 +430,7 @@ fn send_with_subchannels_succeeds() {
}
};
- let direct_data_consumer_2 = match &data_consumer_2 {
+ let _ = match &data_consumer_2 {
DataConsumer::Direct(direct_data_consumer) => direct_data_consumer,
_ => {
panic!("Expected direct data consumer")
@@ -514,7 +514,7 @@ fn send_with_subchannels_succeeds() {
let mut subchannels = data_consumer_2.subchannels();
subchannels.push(1);
- direct_data_consumer_2
+ data_consumer_2
.set_subchannels(subchannels)
.await
.expect("Failed to set subchannels"); All methods are implemented for |
**TODO:** Rust, but I won't do it until #1262 is done and merged.
Rather than DirectDataConsumer.
|
I'm on it. |
set_subchannels()
method must exist not only inDirectDataConsumer
but also inRegularDataConsumer
.DataConsumer
in tests.