aglinxinyuan commented on code in PR #9623:
URL: https://github.com/apache/texera/pull/9623#discussion_r4672902011


##########
amber/src/test/python/core/architecture/rpc/test_async_rpc_server.py:
##########
@@ -108,6 +108,45 @@ def _return_invocation_of(element: DCMElement) -> 
ReturnInvocation:
     return get_one_of(element.payload, sealed=False)
 
 
+def _reply_handler(*messages) -> grpclib.const.Handler:
+    async def handler_func(stream):
+        for message in messages:
+            await stream.send_message(message)
+
+    return _make_handler(handler_func)
+
+
+def _error_handler(exc: Exception) -> grpclib.const.Handler:
+    async def handler_func(stream):
+        raise exc
+
+    return _make_handler(handler_func)
+
+
+def _dispatch(
+    handlers: dict,
+    method_name: str,
+    command_id: int,
+    *,
+    from_name: str = "A",
+    to_name: str = "B",
+    context: AsyncRpcContext | None = None,
+    is_control: bool = True,
+) -> AsyncRPCServer:
+    server = _make_server(handlers)
+    channel = ChannelIdentity(
+        from_worker_id=ActorVirtualIdentity(name=from_name),
+        to_worker_id=ActorVirtualIdentity(name=to_name),
+        is_control=is_control,
+    )

Review Comment:
   Done in 05455da9c8: `_make_channel` takes `is_control: bool = True` now, and 
`_dispatch` calls it.



##########
amber/src/test/python/core/models/test_table.py:
##########
@@ -65,33 +65,17 @@ def target_table(self, target_raw_tuples):
         return Table(target_raw_tuples)
 
     @pytest.fixture
-    def target_data_frame(self, a_timestamp):
+    def target_data_frame(self, target_raw_tuples):
         return pandas.DataFrame(
-            {
-                "field1": [1, 2],
-                "field2": ["hello", "world"],
-                "field3": [2.3, 0.0],
-                "field4": [True, False],
-                "field5": [
-                    a_timestamp,
-                    datetime.datetime.fromtimestamp(1000000000),
-                ],
-                "field6": [b"some binary", pickle.dumps([1, 2, 3])],
-                "7_special-name": [None, "a strange value"],
-                "none": [None, None],
-            },
-            columns=[
-                "field1",
-                "field2",
-                "field3",
-                "field4",
-                "field5",
-                "field6",
-                "7_special-name",
-                "none",
-            ],
+            target_raw_tuples, columns=list(target_raw_tuples[0].keys())
         )

Review Comment:
   Agreed, restored the literal frame in 05455da9c8. `target_data_frame` 
matches `main` again; the only change left in this file is 
`_assert_table_round_trips`.



##########
amber/src/test/python/pytexera/storage/test_large_binary_output_stream.py:
##########
@@ -233,7 +186,6 @@ def test_write_after_upload_error_raises_error(self, 
large_binary):
                 with pytest.raises(IOError):
                     stream.close()
 
-    @pytest.mark.timeout(5)
     def test_write_unblocks_when_upload_fails_with_full_queue(self, 
large_binary):

Review Comment:
   Good catch. Restored `@pytest.mark.timeout(5)` and moved the test onto 
`_mock_s3_upload() as mock_s3` in 05455da9c8. To check the marker, I made the 
upload worker skip `_upload_complete.set()`: the test now fails with `Timeout 
>5.0s` instead of hanging.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to