提交 8a2c03e1 编写于 作者: R Robert Metzger

[FLINK-3995] [build] Fix failing tests and add missing dependencies

This closes #2148
上级 b9f42e91
......@@ -182,12 +182,12 @@ public class InstantiationUtilTest extends TestLogger {
}
}
private static final class WritableType implements IOReadableWritable {
public static final class WritableType implements IOReadableWritable {
private int aInt;
private long aLong;
private WritableType() {
public WritableType() {
Random rnd = new Random();
this.aInt = rnd.nextInt();
this.aLong = rnd.nextLong();
......
......@@ -47,6 +47,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
......
......@@ -52,6 +52,12 @@ under the License.
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
......@@ -68,6 +74,15 @@ under the License.
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime_2.10</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>
......
......@@ -19,7 +19,7 @@
package org.apache.flink.ml.math.distributed
import org.apache.flink.api.scala._
import org.apache.flink.test.util.FlinkTestBase
import org.apache.flink.ml.util.FlinkTestBase
import org.scalatest.{FlatSpec, Matchers}
class DistributedRowMatrixSuite extends FlatSpec with Matchers with FlinkTestBase {
......
......@@ -19,9 +19,8 @@ package org.apache.flink.ml.preprocessing
import org.apache.flink.api.scala.ExecutionEnvironment
import org.apache.flink.api.scala._
import org.apache.flink.test.util.FlinkTestBase
import org.apache.flink.ml.util.FlinkTestBase
import org.scalatest.{Matchers, FlatSpec}
import org.apache.flink.ml.math.Vector
import org.apache.flink.api.scala.utils._
......
......@@ -40,19 +40,22 @@ under the License.
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>${metrics.version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>${metrics.version}</version>
</dependency>
</dependencies>
<build>
......
......@@ -40,11 +40,12 @@ under the License.
<scope>provided</scope>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
......
......@@ -67,6 +67,12 @@ under the License.
<version>3.18.2-GA</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- ===================================================
Testing
=================================================== -->
......
......@@ -286,7 +286,7 @@ public class ExecutionGraphRestartTest extends TestLogger {
new JobID(),
"TestJob",
new Configuration(),
ExecutionConfigTest.getSerializedConfig(),
new SerializedValue<>(new ExecutionConfig()),
AkkaUtils.getDefaultTimeout(),
// We want to manually control the restart and delay
new FixedDelayRestartStrategy(Integer.MAX_VALUE, Long.MAX_VALUE));
......@@ -703,7 +703,7 @@ public class ExecutionGraphRestartTest extends TestLogger {
new JobID(),
"Test job",
new Configuration(),
ExecutionConfigTest.getSerializedConfig(),
new SerializedValue<>(new ExecutionConfig()),
AkkaUtils.getDefaultTimeout(),
controllableRestartStrategy);
......
......@@ -65,6 +65,7 @@ under the License.
<goal>shade</goal>
</goals>
<configuration combine.self="override">
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<artifactSet>
<includes>
<include>com.datastax.cassandra:cassandra-driver-core</include>
......
......@@ -135,6 +135,14 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime_2.10</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils_2.10</artifactId>
......
......@@ -119,6 +119,14 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime_2.10</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>
......
......@@ -104,6 +104,17 @@ under the License.
<reuseForks>false</reuseForks>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
......@@ -87,7 +87,7 @@ public class TestBaseUtils extends TestLogger {
protected static final String DEFAULT_AKKA_STARTUP_TIMEOUT = "60 s";
protected static FiniteDuration DEFAULT_TIMEOUT = new FiniteDuration(DEFAULT_AKKA_ASK_TIMEOUT, TimeUnit.SECONDS);
public static FiniteDuration DEFAULT_TIMEOUT = new FiniteDuration(DEFAULT_AKKA_ASK_TIMEOUT, TimeUnit.SECONDS);
// ------------------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册