Skip to content

Commit

Permalink
Added some sleep that should help reduce flakiness in eventhubs bindi…
Browse files Browse the repository at this point in the history
…ng cert test

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
  • Loading branch information
ItalyPaleAle committed May 13, 2022
1 parent 3bf733d commit 86d5798
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions tests/certification/bindings/azure/eventhubs/eventhubs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package eventhubs_test
import (
"context"
"fmt"

//"os/exec"
"testing"
"time"
Expand Down Expand Up @@ -145,6 +146,7 @@ func TestSinglePartition(t *testing.T) {
return nil
flow.New(t, "eventhubs binding IoTHub testing").
Step("sleep", flow.Sleep(10*time.Second)).
Step(app.Run("app", fmt.Sprintf(":%d", appPort), application)).
Step(sidecar.Run("sidecar",
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort),
Expand All @@ -158,9 +160,10 @@ func TestSinglePartition(t *testing.T) {
Step("Send messages to IoT", publishMessages).
Run()
//TODO: Verfiy service principal
// Flow of events: Start app, sidecar, interrupt network to check reconnection, send and receive
flow.New(t, "eventhubs binding authentication using service principal").
//TODO: Verfiy service principal
// Flow of events: Start app, sidecar, interrupt network to check reconnection, send and receive
flow.New(t, "eventhubs binding authentication using service principal").
Step("sleep", flow.Sleep(10*time.Second)).
Step(app.Run("app", fmt.Sprintf(":%d", appPort), application)).
Step(sidecar.Run("sidecar",
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort),
Expand All @@ -177,6 +180,7 @@ func TestSinglePartition(t *testing.T) {

// Flow of events: Start app, sidecar, interrupt network to check reconnection, send and receive
flow.New(t, "eventhubs binding authentication using connection string single partition").
// Step("sleep", flow.Sleep(10*time.Second)).
Step(app.Run("app", fmt.Sprintf(":%d", appPort), application)).
Step(sidecar.Run("sidecar",
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort),
Expand Down Expand Up @@ -294,6 +298,7 @@ func TestEventhubBindingMultipleSenders(t *testing.T) {
return err
}
flow.New(t, "eventhubs binding authentication using multiple senders and receivers").
Step("sleep", flow.Sleep(10*time.Second)).
Step(app.Run("app", fmt.Sprintf(":%d", appPort), application)).
Step(sidecar.Run("sidecar",
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort),
Expand Down Expand Up @@ -410,6 +415,7 @@ func TestEventhubBindingMultiplePartition(t *testing.T) {
return err
}
flow.New(t, "eventhubs binding authentication using connection string all partitions").
Step("sleep", flow.Sleep(10*time.Second)).
Step(app.Run("app", fmt.Sprintf(":%d", appPort), application)).
Step(sidecar.Run("sidecar",
embedded.WithAppProtocol(runtime.HTTPProtocol, appPort),
Expand Down
2 changes: 1 addition & 1 deletion tests/certification/bindings/azure/eventhubs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module servicebusqueue_test

go 1.17
go 1.18

require (
github.com/dapr/components-contrib v1.7.1-0.20220426033643-068938c67654
Expand Down

0 comments on commit 86d5798

Please sign in to comment.