Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a02ab0

Browse files
author
john-otoole
committed
Minor documentation fixes
1 parent 03a24eb commit 7a02ab0

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

docs/userguide/annotations.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ A `%suitepath` can be provided in three ways:
158158
* [schema]:suite1[.suite2][.suite3]...[.procedure] - execute all tests in all suites from suite1[.suite2][.suite3]...[.procedure] path. If schema is not provided, then the current schema is used. Example: `:all.rooms_tests`
159159
* [schema.]package[.procedure] - execute all tests in the specified test package. The whole hierarchy of suites in the schema is built before all before/after hooks or part suites for the provided suite package are executed as well. Example: `tests.test_contact.test_last_name_validator` or simply `test_contact.test_last_name_validator` if `tests` is the current schema.
160160

161-
# Using automatic rollbacks in tests
161+
# Using automatic rollback in tests
162162

163163
By default, changes performed by every setup, cleanup and test procedure are isolated by savepoints.
164-
This solution is suitable for use-cases where the code that is getting tested as well as the unit tests themselves do not use transaction control (commit/rollback) or DDL commands.
164+
This solution is suitable for use-cases where the code that is being tested as well as the unit tests themselves do not use transaction control (commit/rollback) or DDL commands.
165165

166166
In general, your unit tests should not use transaction control as long as the code you are testing is not using it too.
167167
Keeping the transactions uncommitted allows your changes to be isolated and the execution of tests does not impact others who might be using a shared development database.
@@ -180,7 +180,7 @@ It is recommended to move such DDL statements to a procedure with `pragma autono
180180
Doing so allows your tests to use the framework's automatic transaction control and releases you from the burden of manual cleanup of data that was created or modified by test execution.
181181

182182
When you are testing code that performs explicit or implicit commits, you may set the test procedure to run as an autonomous transaction with `pragma autonomous_transaction`.
183-
Keep in mind that when your tests runs in autonomous transaction it will not see the data prepared in setup procedure unless the setup procedure committed the changes.
183+
Keep in mind that when your test runs as autonomous transaction it will not see the data prepared in a setup procedure unless the setup procedure committed the changes.
184184

185185
# Order of execution
186186

@@ -217,23 +217,21 @@ When processing the test suite `test_pkg` defined in [Example of annotated test
217217

218218
# Annotation cache
219219

220-
utPLSQL needs to scan sources of package specifications to identify and parse annotations.
221-
To improve framework startup time, specially when dealing with database users owning large amount of packages the framework has build-in persistent cache for annotations.
220+
utPLSQL needs to scan the source of package specifications to identify and parse annotations.
221+
To improve framework startup time, especially when dealing with database users owning large amounts of packages, the framework has a built-in persistent cache for annotations.
222222

223-
Cache is checked for staleness and refreshed automatically on every run.
224-
The initial startup of utPLSQL for a schema will take longer than consecutive executions.
223+
The annotation cache is checked for staleness and refreshed automatically on every run. The initial startup of utPLSQL for a schema will take longer than consecutive executions.
225224

226-
If you're in situation, where your database is controlled via CI/CD server and gets refreshed/wiped before each run of your tests,
227-
consider building upfront and creating the snapshot of our database after the cache was refreshed.
228-
229-
To build annotation cache without actually invoking any tests, call `ut_runner.rebuild_annotation_cache(a_object_owner, a_object_type)` sql block for every unit test owner that you want to have annotations cache prebuilt.
225+
If you are in a situation where your database is controlled via CI/CD server and is refreshed/wiped before each run of your tests, consider building the annotation cache upfront and taking a snapshot of the database after the cache has been refreshed.
230226

227+
To build the annotation cache without actually invoking any tests, call `ut_runner.rebuild_annotation_cache(a_object_owner, a_object_type)` for every unit test owner for which you want to have the annotation cache prebuilt.
231228
Example:
232229
```sql
233230
exec ut_runner.rebuild_annotation_cache('HR', 'PACKAGE');
234231
```
235232

236-
To purge annotations cache call:
233+
To purge the annotation cache call `ut_runner.purge_cache(a_object_owner, a_object_type)`.
234+
Example:
237235
```sql
238236
exec ut_runner.purge_cache('HR', 'PACKAGE');
239237
```

0 commit comments

Comments
 (0)