Skip to content

Commit 1d8454a

Browse files
committed
better services ready wait + fix example
1 parent cabfe8f commit 1d8454a

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Enhance how we wait for Chip Ingress services to start

framework/components/dockercompose/chip_ingress_set/chip_ingress.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,14 @@ func New(in *Input) (*Output, error) {
106106
}
107107

108108
stack.WaitForService(DEFAULT_CHIP_INGRESS_SERVICE_NAME,
109-
wait.ForLog("GRPC server is live").WithPollInterval(200*time.Millisecond).WithStartupTimeout(1*time.Minute),
109+
wait.ForAll(
110+
wait.ForLog("GRPC server is live").WithPollInterval(200*time.Millisecond),
111+
wait.ForListeningPort(DEFAULT_CHIP_INGRESS_GRPC_PORT),
112+
).WithDeadline(1*time.Minute),
113+
).WaitForService(DEFAULT_RED_PANDA_SERVICE_NAME,
114+
wait.ForListeningPort(DEFAULT_RED_PANDA_KAFKA_PORT).WithStartupTimeout(1*time.Minute),
115+
).WaitForService(DEFAULT_RED_PANDA_CONSOLE_SERVICE_NAME,
116+
wait.ForListeningPort(DEFAULT_RED_PANDA_CONSOLE_PORT).WithStartupTimeout(1*time.Minute),
110117
)
111118

112119
chipIngressContainer, ingressErr := stack.ServiceContainer(ctx, DEFAULT_CHIP_INGRESS_SERVICE_NAME)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[chip_ingress]
2-
compose_file='../../components/chip_ingress_set/docker-compose.yml'
3-
topics=['cre']
2+
compose_file='../../components/dockercompose/chip_ingress_set/docker-compose.yml'

framework/examples/myproject/smoke_chip_ingress_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ type ChipConfig struct {
1919

2020
// use config file: smoke_chip.toml
2121
func TestChipIngressSmoke(t *testing.T) {
22-
t.Skip("skipping smoke test until we have a way to fetch Chip Ingress image")
22+
// t.Skip("skipping smoke test until we have a way to fetch Chip Ingress image")
23+
os.Setenv("CTF_CONFIGS", "smoke_chip.toml")
2324
in, err := framework.Load[ChipConfig](t)
2425
require.NoError(t, err, "failed to load config")
2526

0 commit comments

Comments
 (0)