Skip to content

Commit 9732ea5

Browse files
authored
[chore][extension/dbstorage] wait 10s before starting the extension (#39640)
DB instantiation fails if we instantly try to connect to it. Wait for 10s before starting the extension as it most likely fails because it's not in a "healthy state" yet. Closes #37079
1 parent 154ba2b commit 9732ea5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

extension/storage/dbstorage/extension_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"runtime"
1313
"sync"
1414
"testing"
15+
"time"
1516

1617
ctypes "github.com/docker/docker/api/types/container"
1718
"github.com/docker/go-connections/nat"
@@ -49,6 +50,10 @@ func TestExtensionIntegrityWithPostgres(t *testing.T) {
4950
})
5051
require.NoError(t, err)
5152

53+
// https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/37079
54+
// DB instantiation fails if we instantly try to connect to it, wait for 10s before starting the extension
55+
time.Sleep(10 * time.Second)
56+
5257
testExtensionIntegrity(t, se)
5358
}
5459

0 commit comments

Comments
 (0)