Adding Output Support for Double2DArray for Client Generator and Service and updating Sample Measurement Example #2722
6 fail, 697 pass in 52m 18s
Annotations
Check warning on line 0 in tests.acceptance.test_client_generator
github-actions / Test Results
All 10 runs failed: test___non_streaming_measurement___create_client___render_without_error (tests.acceptance.test_client_generator)
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py310.xml [took 5s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py311.xml [took 3s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py312.xml [took 5s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py38.xml [took 3s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py39.xml [took 15s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py310.xml [took 2s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py311.xml [took 2s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py312.xml [took 2s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py38.xml [took 2s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py39.xml [took 2s]
Raw output
assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
"""Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
from __future__ import annotations
import logging
import pathlib...
...Full output truncated (701 lines hidden), use '-vv' to show
create_client = functools.partial(<bound method CliRunner.invoke of <click.testing.CliRunner object at 0x0430C2F0>>, <Command create-client>, standalone_mode=False)
test_assets_directory = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets')
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x0426B530>, _basetemp=WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-8'), _retention_count=3, _retention_policy='all')
non_streaming_measurement_service = <ni_measurement_plugin_sdk_service.measurement.service.MeasurementService object at 0x04270310>
def test___non_streaming_measurement___create_client___render_without_error(
create_client: CliRunnerFunction,
test_assets_directory: pathlib.Path,
tmp_path_factory: pytest.TempPathFactory,
non_streaming_measurement_service: MeasurementService,
) -> None:
temp_directory = tmp_path_factory.mktemp("measurement_plugin_client_files")
module_name = "non_streaming_data_measurement_client"
golden_path = test_assets_directory / "example_renders" / "measurement_plugin_client"
filename = f"{module_name}.py"
result = create_client(
[
"--measurement-service-class",
"ni.tests.NonStreamingDataMeasurement_Python",
"--module-name",
module_name,
"--class-name",
"NonStreamingDataMeasurementClient",
"--directory-out",
str(temp_directory),
]
)
assert result.exit_code == 0
> _assert_equal(
golden_path / filename,
temp_directory / filename,
)
tests\acceptance\test_client_generator.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
expected_path = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets/example_renders/measurement_plugin_client/non_streaming_data_measurement_client.py')
result_path = WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-8/measurement_plugin_client_files0/non_streaming_data_measurement_client.py')
def _assert_equal(expected_path: pathlib.Path, result_path: pathlib.Path) -> None:
expected = expected_path.read_text()
result = result_path.read_text()
> assert expected == result
E assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
E
E """Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
E
E from __future__ import annotations
E
E import logging
E import pathlib...
E
E ...Full output truncated (701 lines hidden), use '-vv' to show
tests\acceptance\test_client_generator.py:203: AssertionError
Check warning on line 0 in tests.acceptance.test_client_generator
github-actions / Test Results
All 10 runs failed: test___interactive_mode_with_registered_measurements___create_client___renders_without_error (tests.acceptance.test_client_generator)
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py310.xml [took 1s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py311.xml [took 1s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py312.xml [took 3s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py38.xml [took 1s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py39.xml [took 1s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py39.xml [took 0s]
Raw output
assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
"""Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
from __future__ import annotations
import logging
import pathlib...
...Full output truncated (701 lines hidden), use '-vv' to show
create_client = functools.partial(<bound method CliRunner.invoke of <click.testing.CliRunner object at 0x0430C2F0>>, <Command create-client>, standalone_mode=False)
test_assets_directory = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets')
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x0426B530>, _basetemp=WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-8'), _retention_count=3, _retention_policy='all')
non_streaming_measurement_service = <ni_measurement_plugin_sdk_service.measurement.service.MeasurementService object at 0x04270310>
def test___interactive_mode_with_registered_measurements___create_client___renders_without_error(
create_client: CliRunnerFunction,
test_assets_directory: pathlib.Path,
tmp_path_factory: pytest.TempPathFactory,
non_streaming_measurement_service: MeasurementService,
) -> None:
temp_directory = tmp_path_factory.mktemp("measurement_plugin_client_files")
golden_path = test_assets_directory / "example_renders" / "measurement_plugin_client"
filename = "non_streaming_data_measurement_client.py"
inputs = [
"1",
"non_streaming_data_measurement_client",
"NonStreamingDataMeasurementClient",
"x",
]
os.chdir(temp_directory)
result = create_client(["--interactive"], input="\n".join(inputs))
assert result.exit_code == 0
> _assert_equal(
golden_path / filename,
temp_directory / filename,
)
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_client_generator.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
expected_path = WindowsPath('C:/ar/_work/measurement-plugin-python/measurement-plugin-python/packages/generator/tests/test_assets/example_renders/measurement_plugin_client/non_streaming_data_measurement_client.py')
result_path = WindowsPath('C:/Users/ec2-user/AppData/Local/Temp/pytest-of-unknown/pytest-8/measurement_plugin_client_files3/non_streaming_data_measurement_client.py')
def _assert_equal(expected_path: pathlib.Path, result_path: pathlib.Path) -> None:
expected = expected_path.read_text()
result = result_path.read_text()
> assert expected == result
E assert '"""Generated...pin_map_id)\n' == '"""Generated...pin_map_id)\n'
E
E """Generated client API for the 'Non-Streaming Data Measurement (Py)' measurement plug-in."""
E
E from __future__ import annotations
E
E import logging
E import pathlib...
E
E ...Full output truncated (701 lines hidden), use '-vv' to show
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_client_generator.py:203: AssertionError
Check warning on line 0 in tests.acceptance.test_non_streaming_measurement_client
github-actions / Test Results
All 10 runs failed: test___measurement_plugin_client___measure___returns_output (tests.acceptance.test_non_streaming_measurement_client)
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py310.xml [took 1s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py311.xml [took 1s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py312.xml [took 3s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py38.xml [took 1s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py39.xml [took 1s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py310.xml [took 1s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py39.xml [took 0s]
Raw output
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>.", grpc_status:2, created_time:"2024-11-22T10:15:19.3078697+00:00"}"
>
measurement_plugin_client_module = <module 'test_measurement_client.py' from 'C:\\Users\\ec2-user\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-8\\measurement_plugin_client_files6\\test_measurement_client.py'>
def test___measurement_plugin_client___measure___returns_output(
measurement_plugin_client_module: ModuleType,
) -> None:
test_measurement_client_type = getattr(measurement_plugin_client_module, "TestMeasurement")
output_type = getattr(measurement_plugin_client_module, "Outputs")
expected_output = output_type(
float_out=0.05999999865889549,
double_array_out=[0.1, 0.2, 0.3],
bool_out=False,
string_out="sample string",
string_array_out=[
"string with /forwardslash",
"string with \\backslash",
"string with 'single quotes'",
'string with "double quotes"',
"string with \ttabspace",
"string with \nnewline",
],
path_out=pathlib.Path("sample\\path\\for\\test"),
path_array_out=[
pathlib.Path("path\\with\\forward\\slash"),
pathlib.Path("path\\with\\backslash"),
pathlib.Path("path with 'single quotes'"),
pathlib.Path('path with "double quotes"'),
pathlib.Path("path\twith\ttabs"),
pathlib.Path("path\nwith\nnewlines"),
],
io_out="resource",
io_array_out=["resource1", "resource2"],
integer_out=10,
xy_data_out=None,
enum_out=EnumInEnum.BLUE,
enum_array_out=[EnumInEnum.RED, EnumInEnum.GREEN],
protobuf_enum_out=ProtobufEnumInEnum.BLACK,
double2darray_out=None,
)
measurement_plugin_client = test_measurement_client_type()
> response = measurement_plugin_client.measure()
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_non_streaming_measurement_client.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Users\ec2-user\AppData\Local\Temp\pytest-of-unknown\pytest-8\measurement_plugin_client_files6\test_measurement_client.py:609: in measure
for response in stream_measure_response:
C:\Users\ec2-user\AppData\Local\Temp\pytest-of-unknown\pytest-8\measurement_plugin_client_files6\test_measurement_client.py:671: in stream_measure
for response in self._measure_response:
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:543: in __next__
return self._next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating re...s.array_pb2.Double2DArray\'> got <class \'int\'>.", grpc_status:2, created_time:"2024-11-22T10:15:19.3078697+00:00"}"
>
def _next(self) -> Any:
with self._state.condition:
if self._state.code is None:
event_handler = _event_handler(
self._state, self._response_deserializer
)
self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler,
)
if not operating:
self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
raise self
def _response_ready():
return self._state.response is not None or (
cygrpc.OperationType.receive_message not in self._state.due
and self._state.code is not None
)
_common.wait(self._state.condition.wait, _response_ready)
if self._state.response is not None:
response = self._state.response
self._state.response = None
return response
elif cygrpc.OperationType.receive_message not in self._state.due:
if self._state.code is grpc.StatusCode.OK:
raise StopIteration()
elif self._state.code is not None:
> raise self
E grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
E status = StatusCode.UNKNOWN
E details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
E debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>.", grpc_status:2, created_time:"2024-11-22T10:15:19.3078697+00:00"}"
E >
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:969: _MultiThreadedRendezvous
Check warning on line 0 in tests.acceptance.test_non_streaming_measurement_client
github-actions / Test Results
All 10 runs failed: test___measurement_plugin_client___measure___converts_output_types (tests.acceptance.test_non_streaming_measurement_client)
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py39.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py39.xml [took 0s]
Raw output
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-22T10:15:19.5419763+00:00", grpc_status:2, grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
>
measurement_plugin_client_module = <module 'test_measurement_client.py' from 'C:\\Users\\ec2-user\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-8\\measurement_plugin_client_files6\\test_measurement_client.py'>
def test___measurement_plugin_client___measure___converts_output_types(
measurement_plugin_client_module: ModuleType,
) -> None:
test_measurement_client_type = getattr(measurement_plugin_client_module, "TestMeasurement")
measurement_plugin_client = test_measurement_client_type()
> response = measurement_plugin_client.measure()
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_non_streaming_measurement_client.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Users\ec2-user\AppData\Local\Temp\pytest-of-unknown\pytest-8\measurement_plugin_client_files6\test_measurement_client.py:609: in measure
for response in stream_measure_response:
C:\Users\ec2-user\AppData\Local\Temp\pytest-of-unknown\pytest-8\measurement_plugin_client_files6\test_measurement_client.py:671: in stream_measure
for response in self._measure_response:
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:543: in __next__
return self._next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating re...ust be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
>
def _next(self) -> Any:
with self._state.condition:
if self._state.code is None:
event_handler = _event_handler(
self._state, self._response_deserializer
)
self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler,
)
if not operating:
self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
raise self
def _response_ready():
return self._state.response is not None or (
cygrpc.OperationType.receive_message not in self._state.due
and self._state.code is not None
)
_common.wait(self._state.condition.wait, _response_ready)
if self._state.response is not None:
response = self._state.response
self._state.response = None
return response
elif cygrpc.OperationType.receive_message not in self._state.due:
if self._state.code is grpc.StatusCode.OK:
raise StopIteration()
elif self._state.code is not None:
> raise self
E grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
E status = StatusCode.UNKNOWN
E details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
E debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-22T10:15:19.5419763+00:00", grpc_status:2, grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
E >
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:969: _MultiThreadedRendezvous
Check warning on line 0 in tests.acceptance.test_non_streaming_measurement_client
github-actions / Test Results
All 10 runs failed: test___measurement_plugin_client___stream_measure___returns_output (tests.acceptance.test_non_streaming_measurement_client)
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py39.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py39.xml [took 0s]
Raw output
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-22T10:15:19.7334814+00:00", grpc_status:2, grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
>
measurement_plugin_client_module = <module 'test_measurement_client.py' from 'C:\\Users\\ec2-user\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-8\\measurement_plugin_client_files6\\test_measurement_client.py'>
def test___measurement_plugin_client___stream_measure___returns_output(
measurement_plugin_client_module: ModuleType,
) -> None:
test_measurement_client_type = getattr(measurement_plugin_client_module, "TestMeasurement")
output_type = getattr(measurement_plugin_client_module, "Outputs")
expected_output = output_type(
float_out=0.05999999865889549,
double_array_out=[0.1, 0.2, 0.3],
bool_out=False,
string_out="sample string",
string_array_out=[
"string with /forwardslash",
"string with \\backslash",
"string with 'single quotes'",
'string with "double quotes"',
"string with \ttabspace",
"string with \nnewline",
],
path_out=pathlib.Path("sample\\path\\for\\test"),
path_array_out=[
pathlib.Path("path\\with\\forward\\slash"),
pathlib.Path("path\\with\\backslash"),
pathlib.Path("path with 'single quotes'"),
pathlib.Path('path with "double quotes"'),
pathlib.Path("path\twith\ttabs"),
pathlib.Path("path\nwith\nnewlines"),
],
io_out="resource",
io_array_out=["resource1", "resource2"],
integer_out=10,
xy_data_out=None,
enum_out=EnumInEnum.BLUE,
enum_array_out=[EnumInEnum.RED, EnumInEnum.GREEN],
protobuf_enum_out=ProtobufEnumInEnum.BLACK,
double2darray_out=None,
)
measurement_plugin_client = test_measurement_client_type()
response_iterator = measurement_plugin_client.stream_measure()
> responses = [response for response in response_iterator]
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_non_streaming_measurement_client.py:130:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_non_streaming_measurement_client.py:130: in <listcomp>
responses = [response for response in response_iterator]
C:\Users\ec2-user\AppData\Local\Temp\pytest-of-unknown\pytest-8\measurement_plugin_client_files6\test_measurement_client.py:671: in stream_measure
for response in self._measure_response:
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:543: in __next__
return self._next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating re...ust be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
>
def _next(self) -> Any:
with self._state.condition:
if self._state.code is None:
event_handler = _event_handler(
self._state, self._response_deserializer
)
self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler,
)
if not operating:
self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
raise self
def _response_ready():
return self._state.response is not None or (
cygrpc.OperationType.receive_message not in self._state.due
and self._state.code is not None
)
_common.wait(self._state.condition.wait, _response_ready)
if self._state.response is not None:
response = self._state.response
self._state.response = None
return response
elif cygrpc.OperationType.receive_message not in self._state.due:
if self._state.code is grpc.StatusCode.OK:
raise StopIteration()
elif self._state.code is not None:
> raise self
E grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
E status = StatusCode.UNKNOWN
E details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
E debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-22T10:15:19.7334814+00:00", grpc_status:2, grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
E >
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:969: _MultiThreadedRendezvous
Check warning on line 0 in tests.acceptance.test_non_streaming_measurement_client
github-actions / Test Results
All 10 runs failed: test___measurement_plugin_client___stream_measure___converts_output_types (tests.acceptance.test_non_streaming_measurement_client)
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0a20ef72538e6159c-py39.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py310.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py311.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py312.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py38.xml [took 0s]
test_results/generator/test_results/nimg-i-0f71505648e548b4c-py39.xml [took 0s]
Raw output
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-22T10:15:19.9072094+00:00", grpc_status:2, grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
>
measurement_plugin_client_module = <module 'test_measurement_client.py' from 'C:\\Users\\ec2-user\\AppData\\Local\\Temp\\pytest-of-unknown\\pytest-8\\measurement_plugin_client_files6\\test_measurement_client.py'>
def test___measurement_plugin_client___stream_measure___converts_output_types(
measurement_plugin_client_module: ModuleType,
) -> None:
test_measurement_client_type = getattr(measurement_plugin_client_module, "TestMeasurement")
measurement_plugin_client = test_measurement_client_type()
response_iterator = measurement_plugin_client.stream_measure()
> responses = [response for response in response_iterator]
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_non_streaming_measurement_client.py:145:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\tests\acceptance\test_non_streaming_measurement_client.py:145: in <listcomp>
responses = [response for response in response_iterator]
C:\Users\ec2-user\AppData\Local\Temp\pytest-of-unknown\pytest-8\measurement_plugin_client_files6\test_measurement_client.py:671: in stream_measure
for response in self._measure_response:
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:543: in __next__
return self._next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception iterating re...ust be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
>
def _next(self) -> Any:
with self._state.condition:
if self._state.code is None:
event_handler = _event_handler(
self._state, self._response_deserializer
)
self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler,
)
if not operating:
self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
raise self
def _response_ready():
return self._state.response is not None or (
cygrpc.OperationType.receive_message not in self._state.due
and self._state.code is not None
)
_common.wait(self._state.condition.wait, _response_ready)
if self._state.response is not None:
response = self._state.response
self._state.response = None
return response
elif cygrpc.OperationType.receive_message not in self._state.due:
if self._state.code is grpc.StatusCode.OK:
raise StopIteration()
elif self._state.code is not None:
> raise self
E grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
E status = StatusCode.UNKNOWN
E details = "Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class 'ni.protobuf.types.array_pb2.Double2DArray'> got <class 'int'>."
E debug_error_string = "UNKNOWN:Error received from peer {created_time:"2024-11-22T10:15:19.9072094+00:00", grpc_status:2, grpc_message:"Exception iterating responses: Parameter to CopyFrom() must be instance of same class: expected <class \'ni.protobuf.types.array_pb2.Double2DArray\'> got <class \'int\'>."}"
E >
C:\ar\_work\measurement-plugin-python\measurement-plugin-python\packages\generator\.tox\py311\Lib\site-packages\grpc\_channel.py:969: _MultiThreadedRendezvous