XComp commented on a change in pull request #17593: URL: https://github.com/apache/flink/pull/17593#discussion_r742703871
########## File path: flink-end-to-end-tests/flink-end-to-end-tests-scala/src/test/java/org/apache/flink/tests/scala/ScalaFreeITCase.java ########## @@ -0,0 +1,130 @@ +/* + * 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.flink.tests.scala; + +import org.apache.flink.tests.util.TestUtils; +import org.apache.flink.tests.util.categories.TravisGroup1; +import org.apache.flink.tests.util.flink.ClusterController; +import org.apache.flink.tests.util.flink.FlinkResource; +import org.apache.flink.tests.util.flink.FlinkResourceSetup; +import org.apache.flink.tests.util.flink.JarLocation; +import org.apache.flink.tests.util.flink.JobSubmission; +import org.apache.flink.testutils.executor.TestExecutorResource; +import org.apache.flink.util.TestLogger; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collection; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Consumer; + +/** + * Tests that Flink does not require Scala for jobs that do not use the Scala APIs. This covers both + * pure Java jobs, and Scala jobs that use the Java APIs exclusively with Scala types. + */ +@Category(value = {TravisGroup1.class}) +@RunWith(Parameterized.class) Review comment: Here I'm not 100% sure whether it applies, but didn't we want to switch to junit5 for new tests? ########## File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/FlinkDistribution.java ########## @@ -223,6 +221,22 @@ public void submitSQLJob(SQLJobSubmission job, Duration timeout) throws IOExcept .runBlocking(timeout); } + public void performJarAddition(JarAddition addition) throws IOException { + final Path target = mapJarLocationToPath(addition.getTarget()); + final Path sourceJar = addition.getJar(); + + final String jarNameWithoutExtension = + FilenameUtils.removeExtension(sourceJar.getFileName().toString()); Review comment: Why do we remove the file extension here? 🤔 ########## File path: flink-end-to-end-tests/flink-end-to-end-tests-scala/pom.xml ########## @@ -0,0 +1,227 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <parent> + <artifactId>flink-end-to-end-tests</artifactId> + <groupId>org.apache.flink</groupId> + <version>1.15-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + + <artifactId>flink-end-to-end-tests-scala</artifactId> + <name>Flink : E2E Tests : Scala</name> + + <properties> + <!-- Use an old version that is not actively supported by Flink --> Review comment: Could we also add a bit more of motivation. I guess, we go for an older version to avoid accidentally supporting it in the future? ########## File path: flink-end-to-end-tests/flink-end-to-end-tests-scala/src/test/java/org/apache/flink/tests/scala/ScalaFreeITCase.java ########## @@ -0,0 +1,130 @@ +/* + * 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.flink.tests.scala; + +import org.apache.flink.tests.util.TestUtils; +import org.apache.flink.tests.util.categories.TravisGroup1; +import org.apache.flink.tests.util.flink.ClusterController; +import org.apache.flink.tests.util.flink.FlinkResource; +import org.apache.flink.tests.util.flink.FlinkResourceSetup; +import org.apache.flink.tests.util.flink.JarLocation; +import org.apache.flink.tests.util.flink.JobSubmission; +import org.apache.flink.testutils.executor.TestExecutorResource; +import org.apache.flink.util.TestLogger; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collection; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Consumer; + +/** + * Tests that Flink does not require Scala for jobs that do not use the Scala APIs. This covers both + * pure Java jobs, and Scala jobs that use the Java APIs exclusively with Scala types. + */ +@Category(value = {TravisGroup1.class}) Review comment: Out of curiosity: That's just some label which we didn't rename after migrating to AzureCI, isn't it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
