|
12 | 12 | import org.jenkinsci.test.acceptance.junit.AbstractJUnitTest; |
13 | 13 | import org.jenkinsci.test.acceptance.junit.Since; |
14 | 14 | import org.jenkinsci.test.acceptance.junit.WithPlugins; |
15 | | -import org.jenkinsci.test.acceptance.plugins.matrix_reloaded.MatrixReloadedAction; |
16 | 15 | import org.jenkinsci.test.acceptance.po.LabelAxis; |
17 | 16 | import org.jenkinsci.test.acceptance.po.MatrixBuild; |
18 | 17 | import org.jenkinsci.test.acceptance.po.MatrixConfiguration; |
@@ -186,41 +185,6 @@ public void run_configurations_on_with_a_given_label() throws Exception { |
186 | 185 | .shouldContainsConsoleOutput("(Building|Building remotely) on " + s.getName()); |
187 | 186 | } |
188 | 187 |
|
189 | | - @Test |
190 | | - @WithPlugins({"matrix-reloaded", "matrix-groovy-execution-strategy"}) |
191 | | - public void run_extended_test() { |
192 | | - job.configure(); |
193 | | - // Create a [3,3] matrix |
194 | | - job.addUserAxis(AXIS_X, AXIS_X_VALUES); |
195 | | - job.addUserAxis(AXIS_Y, AXIS_Y_VALUES); |
196 | | - |
197 | | - job.control(by.xpath("//div[normalize-space(text())='%s']/..//select", "Execution Strategy")) |
198 | | - .select(STRATEGY); |
199 | | - job.control(by.xpath("//div[normalize-space(text())='%s']/..//textarea", "Groovy Script")) |
200 | | - .set(GROOVY_SELECTOR_SCRIPT); |
201 | | - |
202 | | - job.save(); |
203 | | - job.startBuild(); |
204 | | - |
205 | | - // Default execution: Only valid combinations are built. Other combinations are not created |
206 | | - MatrixBuild build = waitForSuccessBuild(job); |
207 | | - assertExist(build); |
208 | | - |
209 | | - // Rebuild a non-allowed combination: Valid combinations exist but aren't built. Invalid combinations don't |
210 | | - // exist. |
211 | | - rebuildCombination(job, AXIS_X + "=" + AXIS_X_TEST_NOT_BUILT + "," + AXIS_Y + "=" + AXIS_Y_TEST_NOT_BUILT); |
212 | | - build = waitForSuccessBuild(job); |
213 | | - assertExist(build); |
214 | | - assertBuilt(build, AXIS_X_TEST_NOT_BUILT, AXIS_Y_TEST_NOT_BUILT); |
215 | | - |
216 | | - // Rebuild only one valid combination ([1,1]): This combination exists and is built. The rest of valid |
217 | | - // combinations exist but aren't built. Invalid combinations don't exist. |
218 | | - rebuildCombination(job, AXIS_X + "=" + AXIS_X_TEST_BUILT + "," + AXIS_Y + "=" + AXIS_Y_TEST_BUILT); |
219 | | - build = waitForSuccessBuild(job); |
220 | | - assertExist(build); |
221 | | - assertBuilt(build, AXIS_X_TEST_BUILT, AXIS_Y_TEST_BUILT); |
222 | | - } |
223 | | - |
224 | 188 | private void assertBuilt(MatrixBuild build, int axisX, int axisY) { |
225 | 189 | for (int x = AXIS_INITIAL_VALUE; x <= AXIS_MAX_VALUE; x++) { |
226 | 190 | for (int y = AXIS_INITIAL_VALUE; y <= AXIS_MAX_VALUE; y++) { |
@@ -254,12 +218,6 @@ private MatrixBuild waitForSuccessBuild(MatrixProject job) { |
254 | 218 | return (MatrixBuild) job.getLastBuild().waitUntilFinished().shouldSucceed(); |
255 | 219 | } |
256 | 220 |
|
257 | | - private void rebuildCombination(MatrixProject job, String... combinations) { |
258 | | - MatrixReloadedAction action = job.getLastBuild().action(MatrixReloadedAction.class); |
259 | | - action.open(); |
260 | | - action.rebuild(combinations); |
261 | | - } |
262 | | - |
263 | 221 | private Matcher<? super MatrixRun> built() { |
264 | 222 | return new Matcher<>("Matrix run exists") { |
265 | 223 | @Override |
|
0 commit comments