When setting a where clause, if the timeout is set to a value of 0, the clause is tested once and if it fails, a message of '"wait" timed out' is returned. This can be misleading because there wasn't any real time, so change the message to '"where" clause test failed'.
Signed-off-by: Ryan Moats <rmo...@us.ibm.com> Reported-by: Ryan Moats <rmo...@us.ibm.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-August/077083.html Fixes: f85f8ebb ("Initial implementation of OVSDB.") --- ovsdb/execution.c | 3 ++- tests/ovsdb-execution.at | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ovsdb/execution.c b/ovsdb/execution.c index e972ce7..af0e655 100644 --- a/ovsdb/execution.c +++ b/ovsdb/execution.c @@ -697,7 +697,8 @@ ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser, "\"wait\" timed out after %lld ms", x->elapsed_msec); } else { - error = ovsdb_error("timed out", "\"wait\" timed out"); + error = ovsdb_error("timed out", + "\"where\" clause test failed"); } } else { /* ovsdb_execute() will change this, if triggers really are diff --git a/tests/ovsdb-execution.at b/tests/ovsdb-execution.at index 94630bd..6e768d3 100644 --- a/tests/ovsdb-execution.at +++ b/tests/ovsdb-execution.at @@ -471,7 +471,7 @@ OVSDB_CHECK_EXECUTION([equality wait with extra row], "rows": [{"name": "zero", "number": 0}, {"name": "one", "number": 1}, {"name": "two", "number": 2}]}]]]], - [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out","error":"timed out"}] + [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}] ]]) OVSDB_CHECK_EXECUTION([equality wait with missing row], @@ -490,7 +490,7 @@ OVSDB_CHECK_EXECUTION([equality wait with missing row], "columns": ["name", "number"], "until": "==", "rows": [{"name": "one", "number": 1}]}]]]], - [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out","error":"timed out"}] + [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}] ]]) OVSDB_CHECK_EXECUTION([inequality wait with correct rows], @@ -510,7 +510,7 @@ OVSDB_CHECK_EXECUTION([inequality wait with correct rows], "until": "!=", "rows": [{"name": "zero", "number": 0}, {"name": "one", "number": 1}]}]]]], - [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out","error":"timed out"}] + [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}] ]]) OVSDB_CHECK_EXECUTION([inequality wait with extra row], -- 2.7.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev