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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]