Skip to content

Commit

Permalink
tests & test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsutherland committed Jan 25, 2022
1 parent 20d7ff6 commit ebccb44
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/flakyfunctional/database/00-simple/schema.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CREATE TABLE task_jobs(cycle TEXT, name TEXT, submit_num INTEGER, is_manual_subm
CREATE TABLE task_late_flags(cycle TEXT, name TEXT, value INTEGER, PRIMARY KEY(cycle, name));
CREATE TABLE task_outputs(cycle TEXT, name TEXT, outputs TEXT, PRIMARY KEY(cycle, name));
CREATE TABLE task_pool(cycle TEXT, name TEXT, flow_nums TEXT, status TEXT, is_held INTEGER, PRIMARY KEY(cycle, name, flow_nums));
CREATE TABLE task_prerequisites(cycle TEXT, name TEXT, prereq_name TEXT, prereq_cycle TEXT, prereq_output TEXT, satisfied TEXT, PRIMARY KEY(cycle, name, prereq_name, prereq_cycle, prereq_output));
CREATE TABLE task_prerequisites(cycle TEXT, name TEXT, flow_nums TEXT, prereq_name TEXT, prereq_cycle TEXT, prereq_output TEXT, satisfied TEXT, PRIMARY KEY(cycle, name, flow_nums, prereq_name, prereq_cycle, prereq_output));
CREATE TABLE task_states(name TEXT, cycle TEXT, flow_nums TEXT, time_created TEXT, time_updated TEXT, submit_num INTEGER, status TEXT, PRIMARY KEY(name, cycle, flow_nums));
CREATE TABLE task_timeout_timers(cycle TEXT, name TEXT, timeout REAL, PRIMARY KEY(cycle, name));
CREATE TABLE tasks_to_hold(name TEXT, cycle TEXT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE TABLE inheritance(namespace TEXT, inheritance TEXT, PRIMARY KEY(namespace
INSERT INTO inheritance VALUES('root','["root"]');
INSERT INTO inheritance VALUES('foo','["foo", "root"]');
CREATE TABLE workflow_params(key TEXT, value TEXT, PRIMARY KEY(key));
INSERT INTO workflow_params VALUES('cylc_version', '8.0b2.dev');
INSERT INTO workflow_params VALUES('cylc_version', '8.0rc1.dev0');
CREATE TABLE workflow_template_vars(key TEXT, value TEXT, PRIMARY KEY(key));
CREATE TABLE task_action_timers(cycle TEXT, name TEXT, ctx_key TEXT, ctx TEXT, delays TEXT, num INTEGER, delay TEXT, timeout TEXT, PRIMARY KEY(cycle, name, ctx_key));
INSERT INTO task_action_timers VALUES('1','foo','"poll_timer"','["tuple", [[99, "running"]]]','[]',0,NULL,NULL);
Expand All @@ -21,7 +21,7 @@ INSERT INTO task_pool VALUES('1','foo','["1", "2"]','waiting', 0);
CREATE TABLE task_states(name TEXT, cycle TEXT, flow_nums TEXT, time_created TEXT,
time_updated TEXT, submit_num INTEGER, status TEXT, PRIMARY KEY(name, cycle, flow_nums));
INSERT INTO task_states VALUES('foo','1','["1", "2"]', '2019-06-14T11:30:16+01:00','2019-06-14T11:40:24+01:00',99,'waiting');
CREATE TABLE task_prerequisites(cycle TEXT, name TEXT, prereq_name TEXT, prereq_cycle TEXT, prereq_output TEXT, satisfied TEXT, PRIMARY KEY(cycle, name, prereq_name, prereq_cycle, prereq_output));
CREATE TABLE task_prerequisites(cycle TEXT, name TEXT, flow_nums TEXT, prereq_name TEXT, prereq_cycle TEXT, prereq_output TEXT, satisfied TEXT, PRIMARY KEY(cycle, name, flow_nums, prereq_name, prereq_cycle, prereq_output));
CREATE TABLE task_timeout_timers(cycle TEXT, name TEXT, timeout REAL, PRIMARY KEY(cycle, name));
CREATE TABLE xtriggers(signature TEXT, results TEXT, PRIMARY KEY(signature));
COMMIT;
10 changes: 6 additions & 4 deletions tests/functional/restart/53-task-prerequisites.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ TEST_NAME="${TEST_NAME_BASE}-db-task-prereq"
QUERY='SELECT * FROM task_prerequisites ORDER BY cycle, name, prereq_cycle;'
run_ok "$TEST_NAME" sqlite3 "$DB_FILE" "$QUERY"
cmp_ok "${TEST_NAME}.stdout" << '__EOF__'
2|bar|foo|1|succeeded|0
2|bar|apollo|2|The Eagle has landed|satisfied naturally
3|bar|foo|2|succeeded|satisfied naturally
3|bar|apollo|3|The Eagle has landed|0
1|bar|[1]|foo|0|succeeded|satisfied naturally
1|bar|[1]|apollo|1|The Eagle has landed|satisfied naturally
2|bar|[1]|foo|1|succeeded|0
2|bar|[1]|apollo|2|The Eagle has landed|satisfied naturally
3|bar|[1]|foo|2|succeeded|satisfied naturally
3|bar|[1]|apollo|3|The Eagle has landed|0
__EOF__

workflow_run_fail "${TEST_NAME_BASE}-restart" cylc play "${WORKFLOW_NAME}" --stopcp=3 --no-detach
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/restart/54-incompatible-db/db.sqlite3
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ INSERT INTO task_pool VALUES('1','bar',0,'held','waiting');
CREATE TABLE xtriggers(signature TEXT, results TEXT, PRIMARY KEY(signature));
CREATE TABLE task_action_timers(cycle TEXT, name TEXT, ctx_key TEXT, ctx TEXT, delays TEXT, num INTEGER, delay TEXT, timeout TEXT, PRIMARY KEY(cycle, name, ctx_key));
CREATE TABLE absolute_outputs(cycle TEXT, name TEXT, output TEXT);
CREATE TABLE task_prerequisites(cycle TEXT, name TEXT, prereq_name TEXT, prereq_cycle TEXT, prereq_output TEXT, satisfied TEXT, PRIMARY KEY(cycle, name, prereq_name, prereq_cycle, prereq_output));
CREATE TABLE task_prerequisites(cycle TEXT, name TEXT, flow_nums TEXT, prereq_name TEXT, prereq_cycle TEXT, prereq_output TEXT, satisfied TEXT, PRIMARY KEY(cycle, name, flow_nums, prereq_name, prereq_cycle, prereq_output));
COMMIT;

0 comments on commit ebccb44

Please sign in to comment.