Skip to content

Commit

Permalink
Merge branch 'main' into fix-multiple-port
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Feb 2, 2024
2 parents 0346e5d + c66b203 commit 85510f2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions variation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func TestBoolVariation(t *testing.T) {
got, err := BoolVariation(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -719,7 +719,7 @@ func TestBoolVariationDetails(t *testing.T) {
got, err := BoolVariationDetails(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -1014,7 +1014,7 @@ func TestFloat64Variation(t *testing.T) {
got, err := Float64Variation(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -1318,7 +1318,7 @@ func TestFloat64VariationDetails(t *testing.T) {
got, err := Float64VariationDetails(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -1600,7 +1600,7 @@ func TestJSONArrayVariation(t *testing.T) {
}
assert.Equal(t, tt.want, got, "JSONArrayVariation() got = %v, want %v", got, tt.want)
if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -1890,7 +1890,7 @@ func TestJSONArrayVariationDetails(t *testing.T) {
}
assert.Equal(t, tt.want, got, "JSONArrayVariation() got = %v, want %v", got, tt.want)
if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -2145,7 +2145,7 @@ func TestJSONVariation(t *testing.T) {
got, err := JSONVariation(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -2371,7 +2371,7 @@ func TestJSONVariationDetails(t *testing.T) {
got, err := JSONVariationDetails(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -2633,7 +2633,7 @@ func TestStringVariation(t *testing.T) {
got, err := StringVariation(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -2858,7 +2858,7 @@ func TestStringVariationDetails(t *testing.T) {
got, err := StringVariationDetails(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -3151,7 +3151,7 @@ func TestIntVariation(t *testing.T) {
got, err := IntVariation(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -3418,7 +3418,7 @@ func TestIntVariationDetails(t *testing.T) {
got, err := IntVariationDetails(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down Expand Up @@ -3929,7 +3929,7 @@ func TestRawVariation(t *testing.T) {
got, err := ff.RawVariation(tt.args.flagKey, tt.args.user, tt.args.defaultValue)

if tt.expectedLog != "" {
time.Sleep(20 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
time.Sleep(40 * time.Millisecond) // since the log is async, we are waiting to be sure it's written
content, _ := os.ReadFile(file.Name())
assert.Regexp(t, tt.expectedLog, string(content))
}
Expand Down

0 comments on commit 85510f2

Please sign in to comment.