File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 33import time
44from concurrent import futures
55from cloudquery .sdk import serve
6+ from cloudquery .sdk import message
67from cloudquery .plugin_v3 import plugin_pb2_grpc , plugin_pb2 , arrow
78from cloudquery .sdk .internal .memdb import MemDB
89
@@ -29,6 +30,14 @@ def test_plugin_serve():
2930 response = stub .GetTables (plugin_pb2 .GetTables .Request ())
3031 schemas = arrow .new_schemas_from_bytes (response .tables )
3132 assert len (schemas ) == 1
33+
34+ response = stub .Sync (plugin_pb2 .Sync .Request ())
35+ total_records = 0
36+ for msg in response :
37+ if msg .insert is not None :
38+ rec = arrow .new_record_from_bytes (msg .insert .record )
39+ total_records += 1
40+ assert total_records == 1
3241 finally :
3342 cmd .stop ()
3443 pool .shutdown ()
You can’t perform that action at this time.
0 commit comments