Skip to content

Commit 8cb1cf5

Browse files
authored
Clarify integration test synchronization (#21414)
Signed-off-by: Wouter Born <github@maindrain.net>
1 parent c1f7834 commit 8cb1cf5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ When modifying existing behavior, inspect existing tests first and extend them r
252252
- Integration tests are located in the `itests/` directory.
253253
- Use bndrun configurations to define realistic OSGi runtime environments.
254254
- For lifecycle-sensitive changes, consider activation, deactivation, reactivation, service arrival/removal, and different installation orders where relevant.
255+
- In bnd-based integration tests, do not infer a service-availability race merely from a direct `getService(...)` call during test setup. Services supplied by the resolved runtime are normally available before the tests execute; use polling only when the specific service can actually arrive asynchronously after test execution has started.
256+
- When an integration test modifies a provider tracked by an `AbstractRegistry`-based registry, ensure asynchronous registry activation has completed before modifying the provider. Use `waitForCompletedAsyncActivationTasks()` when available, before adding, updating, or removing provider elements.
255257

256258
### Build Validation
257259

0 commit comments

Comments
 (0)