A few more tweaks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
ItalyPaleAle 2023-01-23 18:05:20 +00:00
parent a84ab2d0f6
commit bd64c60629
3 changed files with 9 additions and 4 deletions

View File

@ -30,7 +30,7 @@ components:
- component: azure.eventhubs
operations: ["create", "operations", "read"]
config:
readBindingWait: 15s
readBindingWait: 8s
- component: azure.eventgrid
operations: ["create", "operations", "read"]
config:

View File

@ -262,10 +262,10 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin
// To stop the test from hanging if there's no response, we can setup a simple timeout.
select {
case <-readChan:
assert.Greater(t, inputBindingCall, 0)
assert.Greater(t, inputBindingCall.Load(), int32(0))
testLogger.Info("Read channel signalled.")
case <-time.After(config.ReadBindingTimeout):
assert.Greaterf(t, inputBindingCall, 0, "Timed out after %v while reading", config.ReadBindingTimeout)
assert.Greaterf(t, inputBindingCall.Load(), int32(0), "Timed out after %v while reading", config.ReadBindingTimeout)
testLogger.Info("Read timeout.")
}
testLogger.Info("Verify Read test done.")

View File

@ -114,7 +114,12 @@ const (
)
//nolint:gochecknoglobals
var testLogger = logger.NewLogger("testLogger")
var testLogger logger.Logger
func init() {
testLogger = logger.NewLogger("testLogger")
testLogger.SetOutputLevel(logger.DebugLevel)
}
type TestConfiguration struct {
ComponentType string `yaml:"componentType,omitempty"`