Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
made tests more restrictive
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Kolb committed Mar 1, 2016
1 parent 1705913 commit b3dc650
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,8 @@ public <OUT> int registerListener(OutputVerifier<OUT> verifier,

@Override
public void onSuccess(ResultState state) {
System.out.println("Success");
if(state != ResultState.SUCCESS) {
if (runningListeners.decrementAndGet() == 0) {
System.out.println("kill-s");
stopExecution();
}
}
Expand All @@ -280,9 +278,7 @@ public void onSuccess(ResultState state) {
@Override
public void onFailure(Throwable throwable) {
//check if other sockets are still running
System.out.println("Failure");
if (runningListeners.decrementAndGet() == 0) {
System.out.println("kill-f");
stopExecution();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.flinkspector.core.trigger.VerifyFinishedTrigger
import org.scalatest.exceptions.TestFailedException

import scala.collection.JavaConversions._
import org.scalatest.time.SpanSugar._

class DataSetEnvironmentSpec extends CoreSpec {

Expand Down Expand Up @@ -107,7 +108,8 @@ class DataSetEnvironmentSpec extends CoreSpec {
})
val outputFormat = env.createTestOutputFormat(happyVerifier)
dataSet.output(outputFormat)
env.executeTest()

env.executeTest()

//check if a forceful stop was invoked
env.hasBeenStopped shouldBe true
Expand Down Expand Up @@ -135,7 +137,10 @@ class DataSetEnvironmentSpec extends CoreSpec {
val outputFormat = env.createTestOutputFormat(sadVerifier)
dataSet.output(outputFormat)
// failAfter(Span(10,Seconds)) {

an [FlinkTestFailedException] shouldBe thrownBy (env.executeTest())


// }
//check if a forceful stop was invoked
env.hasBeenStopped shouldBe true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class StreamTestEnvironmentSpec extends CoreSpec {
val sink = env.createTestSink(happyVerifier)
source.addSink(sink)

env.executeTest()
env.executeTest()

//check if a forceful stop was invoked
env.hasBeenStopped shouldBe true
Expand All @@ -139,9 +139,9 @@ class StreamTestEnvironmentSpec extends CoreSpec {
})
val sink = env.createTestSink(sadVerifier)
source.addSink(sink)
failAfter(Span(3,Seconds)) {

an [FlinkTestFailedException] shouldBe thrownBy (env.executeTest())
}

//check if a forceful stop was invoked
env.hasBeenStopped shouldBe true

Expand Down

0 comments on commit b3dc650

Please sign in to comment.