Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Jan 7, 2025
1 parent f6b3afb commit 0dae7e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ replace github.com/gobuffalo/pop/v6 => github.com/ory/pop/v6 v6.2.1-0.2024112111

require (
connectrpc.com/vanguard v0.3.0
github.com/bufbuild/protovalidate-go v0.8.2
github.com/cenkalti/backoff/v3 v3.2.2
github.com/dgraph-io/ristretto v0.2.0
github.com/ghodss/yaml v1.0.0
Expand Down Expand Up @@ -72,7 +73,6 @@ require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bradleyjkemp/cupaloy/v2 v2.8.0 // indirect
github.com/bufbuild/protovalidate-go v0.8.2 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/cockroach-go/v2 v2.3.5 // indirect
Expand Down
3 changes: 1 addition & 2 deletions internal/driver/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ func serve(ctx context.Context, log *logrusx.Logger, addr string, listenFile str

//nolint:gosec // graceful.WithDefaults already sets a timeout
server := graceful.WithDefaults(&http.Server{
WriteTimeout: 120 * time.Second,
Handler: http.MaxBytesHandler(h2c.NewHandler(handler, &http2.Server{}), 1024*1024*4),
Handler: http.MaxBytesHandler(h2c.NewHandler(handler, &http2.Server{}), 1024*1024*4),
})

eg := &errgroup.Group{}
Expand Down
11 changes: 8 additions & 3 deletions internal/e2e/full_suit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import (
"testing"
"time"

"github.com/ory/herodot"
"github.com/ory/x/cmdx"
prometheus "github.com/ory/x/prometheusx"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/ory/graceful"
"github.com/ory/herodot"
"github.com/ory/x/cmdx"
prometheus "github.com/ory/x/prometheusx"

"github.com/ory/keto/cmd"
cliclient "github.com/ory/keto/cmd/client"
"github.com/ory/keto/internal/relationtuple"
Expand Down Expand Up @@ -51,6 +53,9 @@ const (
)

func Test(t *testing.T) {
// The `large inserts and deletes` test needs a higher timeout to pass.
graceful.DefaultWriteTimeout = 120 * time.Second

t.Parallel()
for _, dsn := range dbx.GetDSNs(t, false) {
t.Run(fmt.Sprintf("dsn=%s", dsn.Name), func(t *testing.T) {
Expand Down

0 comments on commit 0dae7e8

Please sign in to comment.