Last active
December 3, 2018 00:06
-
-
Save afsalthaj/d97f0747ab4d5c22b31efa40f0ec9305 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import org.specs2.data.Tag | |
import org.specs2.matcher.MatchResult | |
import org.specs2.scalacheck.ScalaCheckFunction1 | |
import org.specs2.specification.core.SpecStructure | |
import org.specs2.{ ScalaCheck, Specification } | |
class IntegrationTest extends Specification with ScalaCheck { self => | |
// The test requires external environment. In this case | |
object DockerComposeTag extends Tag("DockerComposeTag") | |
def is: SpecStructure = | |
s2"""Runs an actual kafka cluster, stream engine, and pushes the data continuously $test ${tag(DockerComposeTag)}""" | |
private def test: ScalaCheckFunction1[String, MatchResult[String]] = | |
prop { g: String => | |
// Call kafka related things. Probably set minTestsOk=10, or a lower number. Property based on an actual environment | |
// does seem to have an impedence mismatch.But for that reason, we don't need to hardcode sample data for instance. | |
// Upto you to decide on this. You can just rely on specs2 and not ScalaCheck when you do this test, if you need. | |
g must_=== g | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment