Skip to content

Commit

Permalink
remove unused concunrrency
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored and Pantani committed Mar 12, 2024
1 parent f5df964 commit 86dabe0
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions examples/health-monitor/integration/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"path/filepath"
"testing"
"time"

"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -52,27 +51,26 @@ func TestHealthMonitor(t *testing.T) {
require.NoError(err)

buf := &bytes.Buffer{}
go func() {
env.Must(env.Exec("run health-monitor",
step.NewSteps(step.New(
step.Exec(
envtest.IgniteApp,
"health-monitor",
"monitor",
"--rpc-address", ports.RPC,
"--refresh-duration", "1s",
),
step.Workdir(app.SourcePath()),
step.Stdout(buf),
step.Stderr(buf),
)),
))
}()
time.Sleep(time.Second * 2)
require.Contains(buf.String(), "Chain ID: test")
require.Contains(buf.String(), "Version:")
require.Contains(buf.String(), "Height:")
require.Contains(buf.String(), "Latest Block Hash:")
env.Must(env.Exec("run health-monitor",
step.NewSteps(step.New(
step.Exec(
envtest.IgniteApp,
"health-monitor",
"monitor",
"--rpc-address", ports.RPC,
"--refresh-duration", "1s",
),
step.Workdir(app.SourcePath()),
step.Stdout(buf),
step.Stderr(buf),
)),
))

got := buf.String()
require.Contains(got, "Chain ID: test")
require.Contains(got, "Version:")
require.Contains(got, "Height:")
require.Contains(got, "Latest Block Hash:")
}

func assertLocalPlugins(t *testing.T, app envtest.App, expectedPlugins []pluginsconfig.Plugin) {
Expand Down

0 comments on commit 86dabe0

Please sign in to comment.