Skip to content

Commit

Permalink
Try not using threads in Consumer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-quix committed Sep 26, 2023
1 parent e4608df commit e3539b0
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/streamingdataframes-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
python -m pip install -U -r requirements.txt
- name: Run tests
run: |
python -m pytest -s -v
python -m pytest -s -v -k TestConsumer
# build:
Expand Down
10 changes: 0 additions & 10 deletions src/StreamingDataFrames/streamingdataframes/kafka/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def __init__(
},
)
self._inner_consumer: Optional[ConfluentConsumer] = None
self._running = True

def poll(self, timeout: float = None) -> Optional[Message]:
"""
Expand Down Expand Up @@ -498,13 +497,4 @@ def __enter__(self):
return self

def __exit__(self, exc_type, exc_val, exc_tb):
self._running = False
self.close()

@property
def running(self) -> bool:
"""
Check if the consumer is running.
Note: To be used for testing only.
"""
return self._running
Loading

0 comments on commit e3539b0

Please sign in to comment.