fix servicebus topics certification test

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
This commit is contained in:
Bernd Verst 2022-11-16 16:04:18 -08:00
parent 592ff74f75
commit a76d4b25af
1 changed files with 12 additions and 5 deletions

View File

@ -902,8 +902,6 @@ func TestServicebusDefaultTtl(t *testing.T) {
}
require.NoError(ctx, err, "error publishing message")
}
// Wait for double the TTL after sending the last message.
time.Sleep(time.Second * 20)
return nil
}
}
@ -926,16 +924,25 @@ func TestServicebusDefaultTtl(t *testing.T) {
subscriberApplication(appID1, topicActiveName, consumerGroup1))).
// Run the Dapr sidecar with the component entitymanagement
Step(sidecar.Run(sidecarName1,
Step(sidecar.Run("initalSidecar",
embedded.WithComponentsPath("./components/default_ttl"),
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort+portOffset),
embedded.WithoutApp(),
embedded.WithDaprGRPCPort(runtime.DefaultDaprAPIGRPCPort+portOffset),
embedded.WithDaprHTTPPort(runtime.DefaultDaprHTTPPort+portOffset),
embedded.WithProfilePort(runtime.DefaultProfilePort+portOffset),
componentRuntimeOptions(),
)).
Step(fmt.Sprintf("publish messages to topicToBeCreated: %s", topicActiveName), testTtlPublishMessages(metadata, sidecarName1, topicActiveName, consumerGroup1)).
Step(fmt.Sprintf("publish messages to topicToBeCreated: %s", topicActiveName), testTtlPublishMessages(metadata, "initalSidecar", topicActiveName, consumerGroup1)).
Step("stop initial sidecar", sidecar.Stop("initialSidecar")).
Step("wait", flow.Sleep(20*time.Second)).
Step(sidecar.Run(sidecarName1,
embedded.WithComponentsPath("./components/default_ttl"),
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort+portOffset),
embedded.WithDaprGRPCPort(runtime.DefaultDaprAPIGRPCPort+portOffset*2),
embedded.WithDaprHTTPPort(runtime.DefaultDaprHTTPPort+portOffset*2),
embedded.WithProfilePort(runtime.DefaultProfilePort+portOffset*2),
componentRuntimeOptions(),
)).
Step("verify if app6 has recevied messages published to newly created topic", assertMessages(10*time.Second, consumerGroup1)).
Run()
}