Skip to content

Commit

Permalink
comment on docker requirements, improving compatibility check reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schroeder committed Jun 4, 2016
1 parent ea8ab6b commit 03bbc60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Tested with the following Kafka versions:
Kafka 0.8 is not supported.

see the [compatibility spec](./compatibility/spec.yaml) for the full list of executed compatibility checks.
To execute the compatibility checks, run `make compatibility`.
To execute the compatibility checks, run `make compatibility`. Running the checks require Docker 1.9
or newer.

## Building

Expand Down
15 changes: 11 additions & 4 deletions compatibility/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,24 @@ func main() {

buildDocker("java:8", baseDir+"/docker/java")

successTotal := true
for _, spec := range specs {
fmt.Print("=== RUN checking compatibility with Kafka ", spec.Kafka, " and Scala ", spec.Scala, "...\n")
tag := fmt.Sprintf("kafka:%s-%s", spec.Scala, spec.Kafka)
buildDocker(tag, baseDir+"/docker/kafka", "scala_version="+spec.Scala, "kafka_version="+spec.Kafka)

runTest(tag, spec, healthCheckCommand)
success := runTest(tag, spec, healthCheckCommand)
successTotal = successTotal && success
}

fmt.Println("PASS")
if successTotal {
fmt.Println("PASS")
} else {
fmt.Println("FAIL")
}
}

func runTest(tag string, spec version, healthCheckCommand string) {
func runTest(tag string, spec version, healthCheckCommand string) bool {
zkID, kafkaID, hcCmd := startAll(tag, healthCheckCommand)

success := waitForResponse("http://localhost:8000/", "sync")
Expand All @@ -53,7 +59,7 @@ func runTest(tag string, spec version, healthCheckCommand string) {
fmt.Println("--- FAIL: Kafka", spec.Kafka, "and Scala", spec.Scala, "broker status wasn't reported as in sync within timeout.")

stopAll(zkID, kafkaID, hcCmd)
return
return false
}

success = waitForResponse("http://localhost:8000/cluster", "green")
Expand All @@ -64,6 +70,7 @@ func runTest(tag string, spec version, healthCheckCommand string) {
}

stopAll(zkID, kafkaID, hcCmd)
return success
}

func startAll(tag string, healthCheckCommand string) (zkID string, kafkaID string, hcCmd *exec.Cmd) {
Expand Down

0 comments on commit 03bbc60

Please sign in to comment.