Visitar URL original
fix: Fix ValueError in signal handling for Trino worker threads by mbm-codes · Pull Request #6428 · feast-dev/feast · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update sdk/python/feast/infra/offline_stores/contrib/trino_offline_st…
…ore/tests/test_trino_queries.py

Apply reviewer suggestion: verify correct signals and handler in test

Co-authored-by: Jitendra Yejare <jyejare@redhat.com>
Signed-off-by: MBM <mihir105@gmail.com>
  • Loading branch information
2 people authored and ntkathole committed Jul 1, 2026
commit d9d3faba4baa3c76970db781a8946f304187d5cf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ def test_query_init_in_main_thread_registers_signals():
# Should not raise any exception in main thread
cursor = MagicMock()
with patch("signal.signal") as mock_signal:
query = Query(query_text="SELECT 1", cursor=cursor)
assert query.query_text == "SELECT 1"
# Expected signal.signal to be called twice for SIGINT and SIGTERM
# Verify signal handlers are registered correctly
assert mock_signal.call_count == 2
mock_signal.assert_any_call(signal.SIGINT, query.cancel)
mock_signal.assert_any_call(signal.SIGTERM, query.cancel)
assert mock_signal.call_count == 2


Expand Down