Skip to content

Commit f7ccd6b

Browse files
chore: remove unused SyncSource classes
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
1 parent 4566a8e commit f7ccd6b

1 file changed

Lines changed: 1 addition & 40 deletions

File tree

  • packages/pynumaflow/tests/source

packages/pynumaflow/tests/source/utils.py

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,6 @@ async def partitions_handler(self) -> PartitionsResponse:
5656
return PartitionsResponse(partitions=mock_partitions())
5757

5858

59-
class SyncSource(Sourcer):
60-
def read_handler(self, datum: ReadRequest) -> Iterable[Message]:
61-
payload = b"payload:test_mock_message"
62-
keys = ["test_key"]
63-
offset = mock_offset()
64-
event_time = mock_event_time()
65-
for i in range(10):
66-
yield Message(payload=payload, keys=keys, offset=offset, event_time=event_time)
67-
68-
def ack_handler(self, ack_request: AckRequest):
69-
return
70-
71-
def nack_handler(self, nack_request: NackRequest):
72-
return
73-
74-
def pending_handler(self) -> PendingResponse:
75-
return PendingResponse(count=10)
76-
77-
def partitions_handler(self) -> PartitionsResponse:
78-
return PartitionsResponse(partitions=mock_partitions())
79-
80-
8159
def read_req_source_fn() -> ReadRequest:
8260
request = source_pb2.ReadRequest.Request(
8361
num_records=10,
@@ -127,21 +105,4 @@ async def pending_handler(self) -> PendingResponse:
127105
raise RuntimeError("Got a runtime error from pending handler.")
128106

129107
async def partitions_handler(self) -> PartitionsResponse:
130-
raise RuntimeError("Got a runtime error from partition handler.")
131-
132-
133-
class SyncSourceError(Sourcer):
134-
def read_handler(self, datum: ReadRequest) -> Iterable[Message]:
135-
raise RuntimeError("Got a runtime error from read handler.")
136-
137-
def ack_handler(self, ack_request: AckRequest):
138-
raise RuntimeError("Got a runtime error from ack handler.")
139-
140-
def nack_handler(self, nack_request: NackRequest):
141-
raise RuntimeError("Got a runtime error from nack handler.")
142-
143-
def pending_handler(self) -> PendingResponse:
144-
raise RuntimeError("Got a runtime error from pending handler.")
145-
146-
def partitions_handler(self) -> PartitionsResponse:
147-
raise RuntimeError("Got a runtime error from partition handler.")
108+
raise RuntimeError("Got a runtime error from partition handler.")

0 commit comments

Comments
 (0)