Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use alpine as base image #343

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaultBaseImage: alpine:3.13
10 changes: 5 additions & 5 deletions collect/collect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ func TestCacheSizeReload(t *testing.T) {
coll.AddSpan(&types.Span{TraceID: "2", Event: event})

expectedEvents := 1
wait := 2 * time.Millisecond
wait := 1 * time.Second
check := func() bool {
transmission.Mux.RLock()
defer transmission.Mux.RUnlock()

return len(transmission.Events) == expectedEvents
}
assert.Eventually(t, check, 10*wait, wait, "expected one trace evicted and sent")
assert.Eventually(t, check, 60*wait, wait, "expected one trace evicted and sent")

conf.Mux.Lock()
conf.GetInMemoryCollectorCacheCapacityVal.CacheCapacity = 2
Expand All @@ -339,7 +339,7 @@ func TestCacheSizeReload(t *testing.T) {
defer coll.mutex.RUnlock()

return coll.cache.(*cache.DefaultInMemCache).GetCacheSize() == 2
}, 10*wait, wait, "cache size to change")
}, 60*wait, wait, "cache size to change")

coll.AddSpan(&types.Span{TraceID: "3", Event: event})
time.Sleep(5 * conf.SendTickerVal)
Expand All @@ -351,7 +351,7 @@ func TestCacheSizeReload(t *testing.T) {
conf.ReloadConfig()

expectedEvents = 2
assert.Eventually(t, check, 10*wait, wait, "expected another trace evicted and sent")
assert.Eventually(t, check, 60*wait, wait, "expected another trace evicted and sent")
}

func TestSampleConfigReload(t *testing.T) {
Expand All @@ -361,7 +361,7 @@ func TestSampleConfigReload(t *testing.T) {

conf := &config.MockConfig{
GetSendDelayVal: 0,
GetTraceTimeoutVal: 10 * time.Millisecond,
GetTraceTimeoutVal: 60 * time.Second,
GetSamplerTypeVal: &config.DeterministicSamplerConfig{SampleRate: 1},
SendTickerVal: 2 * time.Millisecond,
GetInMemoryCollectorCacheCapacityVal: config.InMemoryCollectorCacheCapacity{CacheCapacity: 10},
Expand Down