-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Introduce flink on remote cluster e2e test
- Loading branch information
Showing
12 changed files
with
713 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
110 changes: 110 additions & 0 deletions
110
...case/src/test/java/org/apache/streampark/e2e/cases/Flink116OnRemoteClusterDeployTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.streampark.e2e.cases; | ||
|
||
import org.apache.streampark.e2e.core.StreamPark; | ||
import org.apache.streampark.e2e.pages.LoginPage; | ||
import org.apache.streampark.e2e.pages.common.Constants; | ||
import org.apache.streampark.e2e.pages.flink.ApacheFlinkPage; | ||
import org.apache.streampark.e2e.pages.flink.FlinkHomePage; | ||
import org.apache.streampark.e2e.pages.flink.clusters.ClusterDetailForm; | ||
import org.apache.streampark.e2e.pages.flink.clusters.FlinkClustersPage; | ||
import org.apache.streampark.e2e.pages.flink.clusters.RemoteForm; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Order; | ||
import org.junit.jupiter.api.Test; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.remote.RemoteWebDriver; | ||
import org.testcontainers.shaded.org.awaitility.Awaitility; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@StreamPark(composeFiles = "docker/flink-1.16-on-remote/docker-compose.yaml") | ||
public class Flink116OnRemoteClusterDeployTest { | ||
|
||
private static RemoteWebDriver browser; | ||
|
||
private static final String userName = "admin"; | ||
|
||
private static final String password = "streampark"; | ||
|
||
private static final String teamName = "default"; | ||
|
||
private static final String flinkName = "flink-1.16.3"; | ||
|
||
private static final String flinkHome = "/opt/flink/"; | ||
|
||
private static final String flinkDescription = "description test"; | ||
|
||
private static final String flinkClusterName = "flink_1.16.3_cluster_e2e"; | ||
|
||
private static final String flinkJobManagerUrl = "http://jobmanager:8081"; | ||
|
||
private static final ClusterDetailForm.ExecutionMode executionMode = ClusterDetailForm.ExecutionMode.REMOTE; | ||
|
||
@BeforeAll | ||
public static void setUp() { | ||
FlinkHomePage flinkHomePage = new LoginPage(browser) | ||
.login(userName, password, teamName) | ||
.goToNav(ApacheFlinkPage.class) | ||
.goToTab(FlinkHomePage.class); | ||
|
||
flinkHomePage.createFlinkHome(flinkName, flinkHome, flinkDescription); | ||
|
||
flinkHomePage.goToNav(ApacheFlinkPage.class) | ||
.goToTab(FlinkClustersPage.class); | ||
} | ||
|
||
@Test | ||
@Order(10) | ||
public void testCreateFlinkCluster() { | ||
FlinkClustersPage flinkClustersPage = new FlinkClustersPage(browser); | ||
|
||
flinkClustersPage.createFlinkCluster() | ||
.<RemoteForm>addCluster(executionMode) | ||
.jobManagerURL(flinkJobManagerUrl) | ||
.clusterName(flinkClusterName) | ||
.flinkVersion(flinkName) | ||
.submit(); | ||
|
||
Awaitility.await() | ||
.untilAsserted( | ||
() -> assertThat(flinkClustersPage.flinkClusterList()) | ||
.as("Flink clusters list should contain newly-created application") | ||
.extracting(WebElement::getText) | ||
.anyMatch(it -> it.contains(flinkClusterName))); | ||
} | ||
|
||
@Test | ||
@Order(50) | ||
public void testDeleteFlinkCluster() { | ||
final FlinkClustersPage flinkClustersPage = new FlinkClustersPage(browser); | ||
|
||
flinkClustersPage.deleteFlinkCluster(flinkClusterName); | ||
|
||
Awaitility.await() | ||
.untilAsserted( | ||
() -> { | ||
browser.navigate().refresh(); | ||
Thread.sleep(Constants.DEFAULT_SLEEP_MILLISECONDS); | ||
assertThat(flinkClustersPage.flinkClusterList()) | ||
.noneMatch(it -> it.getText().contains(flinkClusterName)); | ||
}); | ||
} | ||
} |
110 changes: 110 additions & 0 deletions
110
...case/src/test/java/org/apache/streampark/e2e/cases/Flink117OnRemoteClusterDeployTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.streampark.e2e.cases; | ||
|
||
import org.apache.streampark.e2e.core.StreamPark; | ||
import org.apache.streampark.e2e.pages.LoginPage; | ||
import org.apache.streampark.e2e.pages.common.Constants; | ||
import org.apache.streampark.e2e.pages.flink.ApacheFlinkPage; | ||
import org.apache.streampark.e2e.pages.flink.FlinkHomePage; | ||
import org.apache.streampark.e2e.pages.flink.clusters.ClusterDetailForm; | ||
import org.apache.streampark.e2e.pages.flink.clusters.FlinkClustersPage; | ||
import org.apache.streampark.e2e.pages.flink.clusters.RemoteForm; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Order; | ||
import org.junit.jupiter.api.Test; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.remote.RemoteWebDriver; | ||
import org.testcontainers.shaded.org.awaitility.Awaitility; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@StreamPark(composeFiles = "docker/flink-1.17-on-remote/docker-compose.yaml") | ||
public class Flink117OnRemoteClusterDeployTest { | ||
|
||
private static RemoteWebDriver browser; | ||
|
||
private static final String userName = "admin"; | ||
|
||
private static final String password = "streampark"; | ||
|
||
private static final String teamName = "default"; | ||
|
||
private static final String flinkName = "flink-1.17.2"; | ||
|
||
private static final String flinkHome = "/opt/flink/"; | ||
|
||
private static final String flinkDescription = "description test"; | ||
|
||
private static final String flinkClusterName = "flink_1.17.2_cluster_e2e"; | ||
|
||
private static final String flinkJobManagerUrl = "http://jobmanager:8081"; | ||
|
||
private static final ClusterDetailForm.ExecutionMode executionMode = ClusterDetailForm.ExecutionMode.REMOTE; | ||
|
||
@BeforeAll | ||
public static void setUp() { | ||
FlinkHomePage flinkHomePage = new LoginPage(browser) | ||
.login(userName, password, teamName) | ||
.goToNav(ApacheFlinkPage.class) | ||
.goToTab(FlinkHomePage.class); | ||
|
||
flinkHomePage.createFlinkHome(flinkName, flinkHome, flinkDescription); | ||
|
||
flinkHomePage.goToNav(ApacheFlinkPage.class) | ||
.goToTab(FlinkClustersPage.class); | ||
} | ||
|
||
@Test | ||
@Order(10) | ||
public void testCreateFlinkCluster() { | ||
FlinkClustersPage flinkClustersPage = new FlinkClustersPage(browser); | ||
|
||
flinkClustersPage.createFlinkCluster() | ||
.<RemoteForm>addCluster(executionMode) | ||
.jobManagerURL(flinkJobManagerUrl) | ||
.clusterName(flinkClusterName) | ||
.flinkVersion(flinkName) | ||
.submit(); | ||
|
||
Awaitility.await() | ||
.untilAsserted( | ||
() -> assertThat(flinkClustersPage.flinkClusterList()) | ||
.as("Flink clusters list should contain newly-created application") | ||
.extracting(WebElement::getText) | ||
.anyMatch(it -> it.contains(flinkClusterName))); | ||
} | ||
|
||
@Test | ||
@Order(50) | ||
public void testDeleteFlinkCluster() { | ||
final FlinkClustersPage flinkClustersPage = new FlinkClustersPage(browser); | ||
|
||
flinkClustersPage.deleteFlinkCluster(flinkClusterName); | ||
|
||
Awaitility.await() | ||
.untilAsserted( | ||
() -> { | ||
browser.navigate().refresh(); | ||
Thread.sleep(Constants.DEFAULT_SLEEP_MILLISECONDS); | ||
assertThat(flinkClustersPage.flinkClusterList()) | ||
.noneMatch(it -> it.getText().contains(flinkClusterName)); | ||
}); | ||
} | ||
} |
110 changes: 110 additions & 0 deletions
110
...case/src/test/java/org/apache/streampark/e2e/cases/Flink118OnRemoteClusterDeployTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.streampark.e2e.cases; | ||
|
||
import org.apache.streampark.e2e.core.StreamPark; | ||
import org.apache.streampark.e2e.pages.LoginPage; | ||
import org.apache.streampark.e2e.pages.common.Constants; | ||
import org.apache.streampark.e2e.pages.flink.ApacheFlinkPage; | ||
import org.apache.streampark.e2e.pages.flink.FlinkHomePage; | ||
import org.apache.streampark.e2e.pages.flink.clusters.ClusterDetailForm; | ||
import org.apache.streampark.e2e.pages.flink.clusters.FlinkClustersPage; | ||
import org.apache.streampark.e2e.pages.flink.clusters.RemoteForm; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Order; | ||
import org.junit.jupiter.api.Test; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.remote.RemoteWebDriver; | ||
import org.testcontainers.shaded.org.awaitility.Awaitility; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@StreamPark(composeFiles = "docker/flink-1.18-on-remote/docker-compose.yaml") | ||
public class Flink118OnRemoteClusterDeployTest { | ||
|
||
private static RemoteWebDriver browser; | ||
|
||
private static final String userName = "admin"; | ||
|
||
private static final String password = "streampark"; | ||
|
||
private static final String teamName = "default"; | ||
|
||
private static final String flinkName = "flink-1.18.1"; | ||
|
||
private static final String flinkHome = "/opt/flink/"; | ||
|
||
private static final String flinkDescription = "description test"; | ||
|
||
private static final String flinkClusterName = "flink_1.18.1_cluster_e2e"; | ||
|
||
private static final String flinkJobManagerUrl = "http://jobmanager:8081"; | ||
|
||
private static final ClusterDetailForm.ExecutionMode executionMode = ClusterDetailForm.ExecutionMode.REMOTE; | ||
|
||
@BeforeAll | ||
public static void setUp() { | ||
FlinkHomePage flinkHomePage = new LoginPage(browser) | ||
.login(userName, password, teamName) | ||
.goToNav(ApacheFlinkPage.class) | ||
.goToTab(FlinkHomePage.class); | ||
|
||
flinkHomePage.createFlinkHome(flinkName, flinkHome, flinkDescription); | ||
|
||
flinkHomePage.goToNav(ApacheFlinkPage.class) | ||
.goToTab(FlinkClustersPage.class); | ||
} | ||
|
||
@Test | ||
@Order(10) | ||
public void testCreateFlinkCluster() { | ||
FlinkClustersPage flinkClustersPage = new FlinkClustersPage(browser); | ||
|
||
flinkClustersPage.createFlinkCluster() | ||
.<RemoteForm>addCluster(executionMode) | ||
.jobManagerURL(flinkJobManagerUrl) | ||
.clusterName(flinkClusterName) | ||
.flinkVersion(flinkName) | ||
.submit(); | ||
|
||
Awaitility.await() | ||
.untilAsserted( | ||
() -> assertThat(flinkClustersPage.flinkClusterList()) | ||
.as("Flink clusters list should contain newly-created application") | ||
.extracting(WebElement::getText) | ||
.anyMatch(it -> it.contains(flinkClusterName))); | ||
} | ||
|
||
@Test | ||
@Order(50) | ||
public void testDeleteFlinkCluster() { | ||
final FlinkClustersPage flinkClustersPage = new FlinkClustersPage(browser); | ||
|
||
flinkClustersPage.deleteFlinkCluster(flinkClusterName); | ||
|
||
Awaitility.await() | ||
.untilAsserted( | ||
() -> { | ||
browser.navigate().refresh(); | ||
Thread.sleep(Constants.DEFAULT_SLEEP_MILLISECONDS); | ||
assertThat(flinkClustersPage.flinkClusterList()) | ||
.noneMatch(it -> it.getText().contains(flinkClusterName)); | ||
}); | ||
} | ||
} |
This file contains 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
Oops, something went wrong.