Skip to content

Commit

Permalink
fix comment for test and dont wrap the heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
madisonchamberlain committed Jun 18, 2024
1 parent aa1b205 commit 14ecdfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 5 additions & 5 deletions function_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ var closeGoWrapperCalledChannel = func(ctx context.Context, f func()) {

func TestGoWrapper(t *testing.T) {
runDBTest(t, func(dbt *DBTest) {
t.Cleanup(
func() {
goWrapperCalled = false
},
)
oldGoroutineWrapper := GoroutineWrapper
t.Cleanup(func() {
GoroutineWrapper = oldGoroutineWrapper
})

GoroutineWrapper = closeGoWrapperCalledChannel

numrows := 100000
Expand Down
7 changes: 1 addition & 6 deletions heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ func (hc *heartbeat) run() {

func (hc *heartbeat) start() {
hc.shutdownChan = make(chan bool)
go GoroutineWrapper(
context.Background(),
func() {
hc.run()
},
)
go hc.run()
logger.Info("heartbeat started")
}

Expand Down

0 comments on commit 14ecdfa

Please sign in to comment.