Skip to content

Commit a63364f

Browse files
committed
address PR review: drop @exclusive from Pause/Resume, update test docs
- Remove @exclusive from "Pause and resume archiving to azure" scenario: it only calls the Backbeat API to pause/resume lifecycle, no overlay change or operator reconciliation is triggered. - Update HOW_TO_WRITE_TESTS.md: document @exclusive tag in Rule 3, add note to Rule 4 distinguishing it from atMostOnePicklePerTag. Issue: ZENKO-5228
1 parent ffb4756 commit a63364f

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

tests/ctst/HOW_TO_WRITE_TESTS.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ restart of multiple services, must be created before the test starts, or in a
3636
dedicated set of tests, that is, a set of test executed before all tests having
3737
a specific tag used for identifying the feature(s).
3838

39-
Note: Testing the reconfiguration of the environment is recommended, but it
40-
should be done carefully to not affect other tests.
39+
When a scenario *must* reconfigure the environment (e.g., create or modify
40+
locations, add overlay endpoints), tag it with `@Exclusive`. This ensures no
41+
other scenario runs in parallel while the exclusive scenario executes, and the
42+
exclusive scenario only starts once all running scenarios have finished. See
43+
the implementation in `common/hooks.ts`.
4144

42-
## 4. Do not use `atMostOnePicklePerTag`.
45+
## 4. Avoid unnecessary parallel restrictions.
4346

44-
If a set of scenario requires the use of `atMostOnePicklePerTag`, they won't
45-
be executed in parallel, which is:
47+
Adding `atMostOnePicklePerTag` for a set of scenarios means they won't be
48+
executed in parallel, which is:
4649

4750
- Not realistic for the production environment.
4851
- Not efficient for the test execution: the duration of tests will suffer.
@@ -59,6 +62,11 @@ possible. Solutions exist:
5962
relative checks.
6063
- As a last resort, we might have a dedicated test suite.
6164

65+
Note: `@Exclusive` (see **Rule #3**) is an exception — it is reserved for
66+
scenarios that mutate cluster-wide state (location creation, overlay changes)
67+
and cannot be made idempotent because the operator reconciliation affects all
68+
running pods. Use it sparingly.
69+
6270
## 5. Focus on validating features.
6371

6472
We only want to assert against externally visible state, as given in the

tests/ctst/features/azureArchive.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ Feature: Azure Archive
257257
@PreMerge
258258
@Flaky
259259
@AzureArchive
260-
@Exclusive
261260
Scenario Outline: Pause and resume archiving to azure (PutObject after pause)
262261
Given a "<versioningConfiguration>" bucket
263262
And a transition workflow to "e2e-azure-archive" location

0 commit comments

Comments
 (0)