Skip to content

Commit

Permalink
run long hammer only in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aditsachde committed Jul 20, 2024
1 parent a722bc3 commit 01493d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
go-version-file: "go.mod"
- name: Run integration test
working-directory: integration
run: go test -timeout 2h -run ^TestCTHammer$
run: go test -timeout 2h -run ^TestCTHammer$ -args -long
10 changes: 9 additions & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package integration

import (
"context"
"flag"
"log"
"net/http"
_ "net/http/pprof"
Expand Down Expand Up @@ -55,6 +56,8 @@ func TestCTIntegration(t *testing.T) {
}
}

var longFlag = flag.Bool("long", false, "Run the hammer test with a large number of operations")

func TestCTHammer(t *testing.T) {
// pprof endpoint
go func() {
Expand Down Expand Up @@ -122,7 +125,7 @@ func TestCTHammer(t *testing.T) {
MinGetEntries: 1,
MaxGetEntries: 1000, // TODO: actual max is 1000
OversizedGetEntries: false, // TODO: fix so this can be true
Operations: 30000,
Operations: 250,
Limiter: nil,
MaxParallelChains: 20,
IgnoreErrors: false, // TODO: fix so this can be false
Expand All @@ -137,6 +140,11 @@ func TestCTHammer(t *testing.T) {
StrictSTHConsistencySize: true,
}

flag.Parse()
if *longFlag {
hammerConfig.Operations = 50000
}

err = integration.HammerCTLog(context.Background(), hammerConfig)
if err != nil {
log.Fatalln("🛑 Hammer test failed:", err)
Expand Down

0 comments on commit 01493d5

Please sign in to comment.