IGNITE-28117 Examples not self-contained - missing or broken setup/teardown causes state leakage#7738
Merged
Pochatkin merged 10 commits intoapache:mainfrom Mar 12, 2026
Merged
Conversation
# Conflicts: # examples/java/src/main/java/org/apache/ignite/example/table/MapperExample.java
…ke them self-contained
valepakh
reviewed
Mar 10, 2026
valepakh
reviewed
Mar 11, 2026
examples/java/src/main/java/org/apache/ignite/example/table/MapperExample.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/org/apache/ignite/example/table/TableExample.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/org/apache/ignite/example/table/MapperExample.java
Outdated
Show resolved
Hide resolved
|
Redundant "\n" has been removed for all ExampleTests. Number of files may seem a lot, but the change is minimal |
valepakh
reviewed
Mar 11, 2026
examples/java/src/main/java/org/apache/ignite/example/table/KeyValueViewExample.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/org/apache/ignite/example/table/KeyValueViewPojoExample.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/org/apache/ignite/example/table/RecordViewExample.java
Outdated
Show resolved
Hide resolved
examples/java/src/main/java/org/apache/ignite/example/table/RecordViewPojoExample.java
Outdated
Show resolved
Hide resolved
valepakh
approved these changes
Mar 12, 2026
Pochatkin
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For an example to be self-contained, it must create all required resources (tables, deployment units, caches, etc.) during setup and destroy them once execution completes. Several examples are not following this contract — teardown is either missing or not executing correctly, leaving behind residual state.
Impact:
Failures when re-running an example on the same cluster without a reset
State leakage between examples when run sequentially in ai3tests
Unreliable cyclic stability testing
Acceptance Criteria:
Each example creates all required resources during setup and destroys them on teardown
Re-running the same example back-to-back on the same cluster succeeds
ai3tests can run all examples sequentially without state leakage
Affected examples:
java/org/apache/ignite/example/client/IgniteClientWithConfigExample.java
java/org/apache/ignite/example/client/IgniteClientExample.java
java/org/apache/ignite/example/storage/StorageEngineExample.java
java/org/apache/ignite/example/table/MapperExample.java
java/org/apache/ignite/example/table/TableExample.java
java/org/apache/ignite/example/tx/TransactionsExample.java