Skip to content

Commit

Permalink
Fix the naming check.
Browse files Browse the repository at this point in the history
  • Loading branch information
zbilun committed Dec 29, 2024
1 parent 1282e49 commit 5ef8eca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions interop/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func main() {
ResponseSize: *soakResponseSize,
PerIterationMaxAcceptableLatency: time.Duration(*soakPerIterationMaxAcceptableLatencyMs) * time.Millisecond,
MinTimeBetweenRPCs: time.Duration(*soakMinTimeMsBetweenRPCs) * time.Millisecond,
OverallTimeoutSeconds: time.Duration(*soakOverallTimeoutSeconds) * time.Second,
OverallTimeout: time.Duration(*soakOverallTimeoutSeconds) * time.Second,
ServerAddr: serverAddr,
NumWorkers: *soakNumWorkers,
Iterations: *soakIterations,
Expand All @@ -380,7 +380,7 @@ func main() {
ResponseSize: *soakResponseSize,
PerIterationMaxAcceptableLatency: time.Duration(*soakPerIterationMaxAcceptableLatencyMs) * time.Millisecond,
MinTimeBetweenRPCs: time.Duration(*soakMinTimeMsBetweenRPCs) * time.Millisecond,
OverallTimeoutSeconds: time.Duration(*soakOverallTimeoutSeconds) * time.Second,
OverallTimeout: time.Duration(*soakOverallTimeoutSeconds) * time.Second,
ServerAddr: serverAddr,
NumWorkers: *soakNumWorkers,
Iterations: *soakIterations,
Expand Down
8 changes: 4 additions & 4 deletions interop/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ type SoakTestConfig struct {
ResponseSize int
PerIterationMaxAcceptableLatency time.Duration
MinTimeBetweenRPCs time.Duration
OverallTimeoutSeconds time.Duration
OverallTimeout time.Duration
ServerAddr string
NumWorkers int
Iterations int
Expand Down Expand Up @@ -779,15 +779,15 @@ func doOneSoakIteration(ctx context.Context, config SoakIterationConfig) (latenc
}

func executeSoakTestInWorker(ctx context.Context, config SoakTestConfig, startTime time.Time, workerID int, workerResults *WorkerResults) {
timeoutDuration := config.OverallTimeoutSeconds
timeoutDuration := config.OverallTimeout
currentChannel := config.SharedChannel
soakIterationsPerWorker := config.Iterations / config.NumWorkers
for i := 0; i < soakIterationsPerWorker; i++ {
if ctx.Err() != nil {
return
}
if time.Since(startTime) >= timeoutDuration {
fmt.Printf("Test exceeded overall timeout of %v, stopping...\n", config.OverallTimeoutSeconds)
fmt.Printf("Test exceeded overall timeout of %v, stopping...\n", config.OverallTimeout)
return
}
earliestNextStart := time.After(config.MinTimeBetweenRPCs)
Expand Down Expand Up @@ -872,7 +872,7 @@ func DoSoakTest(ctx context.Context, soakConfig SoakTestConfig) {
soakConfig.ServerAddr, totalIterations, soakConfig.Iterations, totalFailures, b.String())

if totalIterations != soakConfig.Iterations {
fmt.Fprintf(os.Stderr, "Soak test consumed all %v of time and quit early, ran %d out of %d iterations.\n", soakConfig.OverallTimeoutSeconds, totalIterations, soakConfig.Iterations)
fmt.Fprintf(os.Stderr, "Soak test consumed all %v of time and quit early, ran %d out of %d iterations.\n", soakConfig.OverallTimeout, totalIterations, soakConfig.Iterations)
}

if totalFailures > soakConfig.MaxFailures {
Expand Down
2 changes: 1 addition & 1 deletion interop/xds_federation/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func main() {
ResponseSize: *soakResponseSize,
PerIterationMaxAcceptableLatency: time.Duration(*soakPerIterationMaxAcceptableLatencyMs) * time.Millisecond,
MinTimeBetweenRPCs: time.Duration(*soakMinTimeMsBetweenRPCs) * time.Millisecond,
OverallTimeoutSeconds: time.Duration(*soakOverallTimeoutSeconds) * time.Second,
OverallTimeout: time.Duration(*soakOverallTimeoutSeconds) * time.Second,
ServerAddr: c.uri,
NumWorkers: *soakNumWorkers,
Iterations: *soakIterations,
Expand Down

0 comments on commit 5ef8eca

Please sign in to comment.