Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Nov 22, 2024
1 parent c693502 commit 50fffbf
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions protocol/testutil/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,11 @@ func (builder TestAppBuilder) Build() *TestApp {
tApp.builder.t.Fatal(err)
return nil
}
app, shutdownFn, err := launchValidatorInDir(validatorHomeDir, filteredAppOptions)
app, shutdownFn, err := launchValidatorInDir(
validatorHomeDir,
filteredAppOptions,
"--optimistic-execution-enabled=false",
)
if err != nil {
tApp.builder.t.Fatal(err)
return nil
Expand All @@ -559,7 +563,11 @@ func (builder TestAppBuilder) Build() *TestApp {
tApp.crashingApp = nil

if err == nil {
app, shutdownFn, doneOrRestartErr = launchValidatorInDir(validatorHomeDir, filteredAppOptions)
app, shutdownFn, doneOrRestartErr = launchValidatorInDir(
validatorHomeDir,
filteredAppOptions,
"--optimistic-execution-enabled=false",
)
}

// If we errored shutting down or relaunching then update the shutdownFn to return this error
Expand Down Expand Up @@ -1241,6 +1249,7 @@ func prepareValidatorHomeDir(
func launchValidatorInDir(
validatorHomeDir string,
appOptions map[string]interface{},
additionalCmdArgs ...string,
) (a *app.App, shutdownFn func() error, err error) {
// Create a context that can be cancelled to stop the Cosmos App.
done := make(chan error, 1)
Expand Down Expand Up @@ -1289,7 +1298,7 @@ func launchValidatorInDir(

// Specify the start-up flags.
// TODO(CLOB-930): Allow for these flags to be overridden.
rootCmd.SetArgs([]string{
cmdArgs := []string{
"start",
// Do not start tendermint.
"--grpc-only",
Expand All @@ -1308,7 +1317,9 @@ func launchValidatorInDir(
"--oracle.enabled=false",
"--oracle.metrics_enabled=false",
"--log_level=error",
})
}
cmdArgs = append(cmdArgs, additionalCmdArgs...)
rootCmd.SetArgs(cmdArgs)

ctx := svrcmd.CreateExecuteContext(parentCtx)
rootCmd.PersistentFlags().String(
Expand Down

0 comments on commit 50fffbf

Please sign in to comment.