[
https://issues.apache.org/jira/browse/FLINK-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14731884#comment-14731884
]
Chiwan Park commented on FLINK-2619:
------------------------------------
I'm working on this.
I think that it is not related to {{WordSpecLike}}. When I change base class to
{{FlatSpec}}, The problem still exists.
I found two solutions for this:
1. Add {{JUnitRunner}} into top of scala test.
{code}
@RunWith(classOf[JUnitRunner])
class TaskManagerLossFailsTasksTest extends WordSpecLike with Matchers {
"A task manager loss" must {
"fail the assigned tasks" in {
try {
val instance1 = ExecutionGraphTestUtils.getInstance(
new SimpleActorGateway(TestingUtils.defaultExecutionContext), 10)
{code}
2. Add {{scalatest-maven-plugin}} into maven module definition and remove
{{JUnitRunner}} in current executed Scala test cases. ({{flink-ml}} includes
this and works well.)
{code}
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<stdout>W</stdout> <!-- Skip coloring output -->
</configuration>
<executions>
<execution>
<id>scala-test</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<suffixes>(?<!(IT|Integration))(Test|Suite|Case)</suffixes>
<argLine>-Xms256m -Xmx800m
-Dlog4j.configuration=${log4j.configuration} -XX:-UseGCOverheadLimit</argLine>
</configuration>
</execution>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<suffixes>(IT|Integration)(Test|Suite|Case)</suffixes>
<argLine>-Xms256m -Xmx800m
-Dlog4j.configuration=${log4j.configuration} -XX:-UseGCOverheadLimit</argLine>
</configuration>
</execution>
</executions>
</plugin>
{code}
I prefer the second option.
> Some Scala Tests not being executed by Maven
> --------------------------------------------
>
> Key: FLINK-2619
> URL: https://issues.apache.org/jira/browse/FLINK-2619
> Project: Flink
> Issue Type: Bug
> Components: Tests
> Reporter: Chiwan Park
> Assignee: Chiwan Park
> Priority: Critical
>
> Some Scala Tests are not executed by Maven. Originally this issue are
> reported by [~StephanEwen]. I also executed {{mvn clean verify}} and found
> the same circumstance.
> Original post is
> [here|http://mail-archives.apache.org/mod_mbox/flink-dev/201508.mbox/%3ccanc1h_tlgt-rrtybua6c0ypihhv8w1bwyb4sogahn9_cfck...@mail.gmail.com%3e]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)