Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Jan 16, 2025
1 parent b30ba7a commit b7f7baf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _get_threadpool_executor(instance: DagsterInstance):

mid_iteration_terminate_scenarios = [
AssetDaemonScenario(
id="two_distinct_graphs_so_multiple_runs",
id="stop_while_submitting_runs",
initial_spec=two_distinct_partitions_graphs.with_current_time(time_partitions_start_str)
.with_current_time_advanced(days=1, hours=1)
.with_all_eager(),
Expand Down Expand Up @@ -184,7 +184,6 @@ def _get_threadpool_executor(instance: DagsterInstance):
# just run over a subset of the total scenarios
daemon_scenarios = [*basic_scenarios, *partition_scenarios, *mid_iteration_terminate_scenarios]

# test_asset_daemon_with_sensor[4-cursor_reset_correctly]
# Additional repo with assets that should be not be included in the evaluation
extra_definitions = ScenarioSpec(
[
Expand Down Expand Up @@ -296,7 +295,6 @@ def _get_threadpool_executor(instance: DagsterInstance):
"scenario", daemon_scenarios, ids=[scenario.id for scenario in daemon_scenarios]
)
def test_asset_daemon_without_sensor(scenario: AssetDaemonScenario) -> None:
# test_asset_daemon_without_sensor[two_distinct_graphs_so_multiple_runs]
with get_daemon_instance(
extra_overrides={"auto_materialize": {"use_sensors": False}}
) as instance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,10 @@ def assert_requested_runs_for_stopped_iteration(
self._log_assertion_error(expected_run_requests, [])
raise AssertionError("Expected run requests not found in tick data")

if len(ticks) > 1:
if sensor_origin and len(ticks) > 1:
prev_tick = ticks[-2]
assert prev_tick.cursor is not None
assert latest_tick.cursor is not None
if prev_tick.cursor and latest_tick.cursor:
prev_cursor = deserialize_value(prev_tick.cursor, AssetDaemonCursor)
latest_cursor = deserialize_value(latest_tick.cursor, AssetDaemonCursor)
Expand All @@ -487,8 +489,6 @@ def assert_requested_runs_for_stopped_iteration(
prev_cursor.previous_condition_cursors
== latest_cursor.previous_condition_cursors
)
else:
self.logger.critical("No cursor found in tick data")

return self

Expand Down

0 comments on commit b7f7baf

Please sign in to comment.