You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/DatabaseLibrary/__init__.py
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -96,8 +96,27 @@ class DatabaseLibrary(ConnectionManager, Query, Assertion):
96
96
= Inline assertions =
97
97
Keywords that accept arguments ``assertion_operator`` <`AssertionOperator`> and ``expected_value``
98
98
perform a check according to the specified condition - using the [https://github.com/MarketSquare/AssertionEngine|Assertion Engine].
99
-
| Check Row Count SELECT id FROM person == 2
100
-
| Check Query Result SELECT first_name FROM person contains Allan
99
+
100
+
Examples:
101
+
| Check Row Count | SELECT id FROM person | *==* | 2 |
102
+
| Check Query Result | SELECT first_name FROM person | *contains* | Allan |
103
+
104
+
= Retry mechanism =
105
+
Assertion keywords that accept arguments ``retry_timeout`` and ``retry_pause`` support waiting for assertion to pass.
106
+
107
+
Setting the ``retry_timeout`` argument enables the mechanism -
108
+
in this case the SQL request and the assertion are executed in a loop,
109
+
until the assertion is passed or the ``retry_timeout`` is reached.
110
+
The pause between the loop iterations is set using the ``retry_pause`` argument.
111
+
112
+
The argument values are set in [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#time-format|Robot Framework time format] -
113
+
e.g. ``5 seconds``.
114
+
115
+
The retry mechanism is disabled by default - the ``retry_timeout`` is set to ``0``.
116
+
117
+
Examples:
118
+
| Check Row Count | SELECT id FROM person | *==* | 2 | retry_timeout=10 seconds |
119
+
| Check Query Result | SELECT first_name FROM person | *contains* | Allan | retry_timeout=5s | retry_timeout=1s |
101
120
102
121
= Database modules compatibility =
103
122
The library is basically compatible with any [https://peps.python.org/pep-0249|Python Database API Specification 2.0] module.
0 commit comments