Skip to content

Commit 7f81be0

Browse files
committed
address comment.
Signed-off-by: Morven Cao <lcao@redhat.com>
1 parent db9f888 commit 7f81be0

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,11 @@ generate:
294294

295295
run: install
296296
maestro migration
297-
maestro server
297+
@if [ "$(MESSAGE_DRIVER_TYPE)" = "grpc" ]; then \
298+
maestro server --message-broker-type=$(MESSAGE_DRIVER_TYPE); \
299+
else \
300+
maestro server --message-broker-type=$(MESSAGE_DRIVER_TYPE) --message-broker-config-file=./secrets/$(MESSAGE_DRIVER_TYPE).config; \
301+
fi
298302
.PHONY: run
299303

300304
# Run Swagger and host the api docs
@@ -476,8 +480,12 @@ pubsub/teardown:
476480
$(container_tool) rm pubsub-maestro
477481

478482
.PHONY: pubsub/init
479-
pubsub/init:
483+
pubsub/init: pubsub/setup
480484
@echo "Initializing Pub/Sub emulator topics and subscriptions..."
485+
@echo "Waiting for emulator to be ready..."
486+
@for i in {1..30}; do \
487+
curl -s http://localhost:$(pubsub_port) >/dev/null 2>&1 && break || sleep 1; \
488+
done
481489
@PUBSUB_EMULATOR_HOST=localhost:$(pubsub_port) PUBSUB_PROJECT_ID=$(pubsub_project_id) python3 hack/init-pubsub-emulator.py
482490

483491
crc/login:

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ $ make run
116116

117117
# OR run with Pub/Sub emulator
118118
# First, ensure the Pub/Sub emulator is running and configured
119-
$ ./maestro migration
120-
$ ./maestro server --message-broker-type=pubsub --message-broker-config-file=./secrets/pubsub.config
119+
$ MESSAGE_DRIVER_TYPE=pubsub make run
121120
```
122121

123122
#### List the consumers

test/e2e/pkg/suite_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import (
1111
"testing"
1212
"time"
1313

14-
"k8s.io/klog/v2"
15-
1614
. "github.com/onsi/ginkgo/v2"
1715
. "github.com/onsi/gomega"
1816
"github.com/openshift-online/ocm-sdk-go/logging"

0 commit comments

Comments
 (0)