mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
test-ovsdb: Triggers should wake up other triggers immediately.
When a trigger executes, it can make changes to the database that fulfill the conditions for some other trigger to execute. ovsdb-server implements this properly, but the code in test-ovsdb for testing triggers outside ovsdb-server did not. This fixes the problem. Found by inspection. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
@@ -181,7 +181,7 @@ t=5: new trigger 1
|
||||
t=5: new trigger 2
|
||||
t=10: trigger 3 (immediate): [{"uuid":["uuid","<2>"]}]
|
||||
t=10: trigger 2 (delayed): [{},{"count":2}]
|
||||
t=15: trigger 1 (delayed): [{},{"count":1},{"uuid":["uuid","<3>"]}]
|
||||
t=10: trigger 1 (delayed): [{},{"count":1},{"uuid":["uuid","<3>"]}]
|
||||
t=15: trigger 4 (immediate): [{"rows":[{"_uuid":["uuid","<3>"],"_version":["uuid","<4>"],"name":"three","number":3}]}]
|
||||
]])
|
||||
|
||||
|
@@ -1535,6 +1535,7 @@ do_trigger(struct ovs_cmdl_context *ctx)
|
||||
struct test_trigger *t;
|
||||
LIST_FOR_EACH_POP (t, trigger.node, &session.completions) {
|
||||
do_trigger_dump(t, now, "delayed");
|
||||
ovsdb_trigger_run(db, now);
|
||||
}
|
||||
|
||||
ovsdb_trigger_wait(db, now);
|
||||
|
Reference in New Issue
Block a user