Skip to content

Commit 1fa9aff

Browse files
committed
Remove the timeout from the gRPC stream call
The timeout counts for the whole duration of the call, not each individual streamed message, so it always times out, as we expect this stream to basically last forever. On top of this, disconnecting the stream seems to trigger some bug in the SDK, so we better avoid it for now. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 68e54da commit 1fa9aff

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/frequenz/client/microgrid/_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ def receive_component_data_samples_stream(
624624
metrics=metrics_set
625625
),
626626
),
627-
timeout=DEFAULT_GRPC_CALL_TIMEOUT,
628627
)
629628
),
630629
lambda msg: component_data_samples_from_proto(msg.telemetry),

tests/client_test_cases/receive_component_data_samples_stream/empty_case.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def assert_stub_method_call(stub_method: Any) -> None:
2929
microgrid_pb2.ReceiveElectricalComponentTelemetryStreamRequest(
3030
electrical_component_id=1,
3131
filter=_Filter(metrics=[metrics_pb2.Metric.METRIC_AC_CURRENT]),
32-
),
33-
timeout=60.0,
32+
)
3433
)
3534

3635

tests/client_test_cases/receive_component_data_samples_stream/error_case.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def assert_stub_method_call(stub_method: Any) -> None:
3333
microgrid_pb2.ReceiveElectricalComponentTelemetryStreamRequest(
3434
electrical_component_id=1,
3535
filter=_Filter(metrics=[metrics_pb2.Metric.METRIC_DC_VOLTAGE]),
36-
),
37-
timeout=60.0,
36+
)
3837
)
3938

4039

tests/client_test_cases/receive_component_data_samples_stream/many_case.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ def assert_stub_method_call(stub_method: Any) -> None:
4444
metrics_pb2.Metric.METRIC_DC_CURRENT,
4545
]
4646
),
47-
),
48-
timeout=60.0,
47+
)
4948
)
5049

5150

0 commit comments

Comments
 (0)