Skip to content

Commit

Permalink
Revise test code
Browse files Browse the repository at this point in the history
  • Loading branch information
kokodak committed Aug 13, 2024
1 parent 09aa951 commit 601eb83
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion test/integration/retention_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/yorkie-team/yorkie/server/backend/background"
"github.com/yorkie-team/yorkie/server/backend/database/mongo"
"github.com/yorkie-team/yorkie/server/logging"
"github.com/yorkie-team/yorkie/server/profiling/prometheus"
"github.com/yorkie-team/yorkie/test/helper"
)

Expand All @@ -44,7 +45,12 @@ func TestRetention(t *testing.T) {
patch, err := monkey.PatchInstanceMethodByName(
reflect.TypeOf(b),
"AttachGoroutine",
func(_ *background.Background, f func(c context.Context)) {
func(
_ *background.Background,
f func(c context.Context),
_ *prometheus.Metrics,
_ string,
) {
f(context.Background())
},
)
Expand Down
8 changes: 7 additions & 1 deletion test/integration/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/yorkie-team/yorkie/pkg/document/json"
"github.com/yorkie-team/yorkie/pkg/document/presence"
"github.com/yorkie-team/yorkie/server/backend/background"
"github.com/yorkie-team/yorkie/server/profiling/prometheus"
"github.com/yorkie-team/yorkie/test/helper"
)

Expand All @@ -40,7 +41,12 @@ func TestSnapshot(t *testing.T) {
patch, err := monkey.PatchInstanceMethodByName(
reflect.TypeOf(b),
"AttachGoroutine",
func(_ *background.Background, f func(c context.Context)) {
func(
_ *background.Background,
f func(c context.Context),
_ *prometheus.Metrics,
_ string,
) {
f(context.Background())
},
)
Expand Down

0 comments on commit 601eb83

Please sign in to comment.