mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-12 15:52:53 +02:00
new tracing system
This commit is contained in:
parent
8f36870650
commit
b9065b6a55
130 changed files with 7928 additions and 1836 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/pomerium/pomerium/internal/telemetry/trace"
|
||||
"github.com/pomerium/pomerium/internal/testenv"
|
||||
"github.com/pomerium/pomerium/pkg/grpcutil"
|
||||
"google.golang.org/grpc"
|
||||
|
@ -12,6 +13,11 @@ import (
|
|||
)
|
||||
|
||||
func WaitStartupComplete(env testenv.Environment, timeout ...time.Duration) time.Duration {
|
||||
if env.GetState() == testenv.NotRunning {
|
||||
panic("test bug: WaitStartupComplete called before starting the test environment")
|
||||
}
|
||||
_, span := trace.Continue(env.Context(), "snippets.WaitStartupComplete")
|
||||
defer span.End()
|
||||
start := time.Now()
|
||||
recorder := env.NewLogRecorder()
|
||||
if len(timeout) == 0 {
|
||||
|
@ -31,5 +37,6 @@ func WaitStartupComplete(env testenv.Environment, timeout ...time.Duration) time
|
|||
)
|
||||
env.Require().NoError(err)
|
||||
env.Require().True(cc.WaitForStateChange(ctx, connectivity.Ready))
|
||||
cc.Close()
|
||||
return time.Since(start)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue