Commit 79f642c
committed
GEODE-10490: Clean up partial DS on retry and fix null pointer in test cleanup
1. LocatorStarterRule: Added cleanup of partial distributed system before retry.
When startLocatorAndDS() fails with port binding error, it may have partially
created a DS. This causes 'distributed system already exists' error on retry.
Now properly stop locator and disconnect DS before retrying.
2. HeadlessGfshIntegrationTest: Added null checks in cleanup() method.
If setup() fails (e.g., port binding failure), gfsh/cache/ds may be null,
causing NullPointerException in @after cleanup. Added defensive null checks.1 parent 6e7573f commit 79f642c
File tree
2 files changed
+21
-3
lines changed- geode-dunit/src/main/java/org/apache/geode/test/junit/rules
- geode-gfsh/src/integrationTest/java/org/apache/geode/management/internal/cli
2 files changed
+21
-3
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
0 commit comments