Commit ee6d64a
authored
[Test] Fix FileSettingsRoleMappingsRestartIT (elastic#129618)
The elastic#127318 changed the behaviour of `client()` to not start a node if there
is none found in the cluster. Which also changed the `getMasterName()`
behaviour to simply fail if there are no nodes instead of starting one.
This is why the `getMasterName()` is failing now. There were no nodes
started because the test scope is set to manually manage master nodes
(`autoManageMasterNodes = false`) without data nodes (`numDataNodes = 0`).
The fix is to actually start the master node instead of attempting to get
the master node name from an empty cluster and depend on a side effect
to actually boostrap a node.
Additionally it awaits for the master node to process all cluster state events
before proceeding, which should hopefully solve the original cause of failures.
Resolves elastic#120964
Resolves elastic#1209231 parent 9cc034b commit ee6d64a
File tree
2 files changed
+4
-8
lines changed- x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security
2 files changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
| |||
167 | 164 | | |
168 | 165 | | |
169 | 166 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 167 | | |
174 | 168 | | |
175 | 169 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | | - | |
| 197 | + | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
0 commit comments