You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "TSultanov (via GitHub)" <gi...@apache.org> on 2023/02/10 11:24:13 UTC
[GitHub] [beam] TSultanov commented on a diff in pull request #25357: [Do not merge] Kafka emulator improvements
TSultanov commented on code in PR #25357:
URL: https://github.com/apache/beam/pull/25357#discussion_r1102638950
##########
playground/backend/internal/emulators/kafka.go:
##########
@@ -31,43 +35,90 @@ import (
)
const (
- brokerCount = 1
addressSeperator = ":"
pauseDuration = 100 * time.Millisecond
- globalDuration = 2 * time.Second
+ globalDuration = 120 * time.Second
bootstrapServerKey = "bootstrap.servers"
networkType = "tcp"
jsonExt = ".json"
avroExt = ".avro"
)
type KafkaMockCluster struct {
- cluster *kafka.MockCluster
- host string
- port string
+ cmd *exec.Cmd
+ host string
+ port string
+ preparerParameters map[string]string
}
-func NewKafkaMockCluster() (*KafkaMockCluster, error) {
- cluster, err := kafka.NewMockCluster(brokerCount)
+func NewKafkaMockCluster(emulatorExecutablePath string) (*KafkaMockCluster, error) {
+ cmd := exec.Command("java", "-jar", emulatorExecutablePath)
Review Comment:
We are building containers with `go1.18`. `os/exec.Cmd` doesn't have `Err` field in that version of Go: https://cs.opensource.google/go/go/+/refs/tags/go1.18.9:src/os/exec/exec.go;l=57
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org