This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch sidx/mock in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit cc1fce7fbe2cf2f45227535660cd1d10db0a3000 Author: Gao Hongtao <hanahm...@gmail.com> AuthorDate: Wed Aug 20 10:34:39 2025 +0700 Fix linting issues Signed-off-by: Gao Hongtao <hanahm...@gmail.com> --- banyand/internal/sidx/integration_test_framework.go | 2 +- banyand/internal/sidx/integration_test_framework_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/banyand/internal/sidx/integration_test_framework.go b/banyand/internal/sidx/integration_test_framework.go index ffc6a5ca..2c939e5d 100644 --- a/banyand/internal/sidx/integration_test_framework.go +++ b/banyand/internal/sidx/integration_test_framework.go @@ -573,7 +573,7 @@ func (itf *IntegrationTestFramework) registerDefaultScenarios() { requests := framework.GenerateTestData(2, 5) return framework.sidx.Write(ctx, requests) }, - Execute: func(ctx context.Context, framework *IntegrationTestFramework) error { + Execute: func(_ context.Context, framework *IntegrationTestFramework) error { // Test flush if err := framework.sidx.Flush(); err != nil { return fmt.Errorf("flush failed: %w", err) diff --git a/banyand/internal/sidx/integration_test_framework_test.go b/banyand/internal/sidx/integration_test_framework_test.go index 96281c8a..6b0ee5ef 100644 --- a/banyand/internal/sidx/integration_test_framework_test.go +++ b/banyand/internal/sidx/integration_test_framework_test.go @@ -298,19 +298,19 @@ func TestIntegrationTestFramework_CustomScenario(t *testing.T) { customScenario := TestScenario{ Name: "TestCustomScenario", Description: "Test that all phases are called", - Setup: func(ctx context.Context, framework *IntegrationTestFramework) error { + Setup: func(_ context.Context, _ *IntegrationTestFramework) error { setupCalled = true return nil }, - Execute: func(ctx context.Context, framework *IntegrationTestFramework) error { + Execute: func(_ context.Context, _ *IntegrationTestFramework) error { executeCalled = true return nil }, - Validate: func(ctx context.Context, framework *IntegrationTestFramework) error { + Validate: func(_ context.Context, _ *IntegrationTestFramework) error { validateCalled = true return nil }, - Cleanup: func(ctx context.Context, framework *IntegrationTestFramework) error { + Cleanup: func(_ context.Context, _ *IntegrationTestFramework) error { cleanupCalled = true return nil }, @@ -341,7 +341,7 @@ func TestIntegrationTestFramework_ScenarioFailure(t *testing.T) { failingScenario := TestScenario{ Name: "FailingScenario", Description: "A scenario that fails during execution", - Execute: func(ctx context.Context, framework *IntegrationTestFramework) error { + Execute: func(_ context.Context, _ *IntegrationTestFramework) error { return fmt.Errorf("intentional failure") }, } @@ -366,7 +366,7 @@ func TestIntegrationTestFramework_MemoryProfiling(t *testing.T) { memoryScenario := TestScenario{ Name: "MemoryScenario", Description: "Test memory profiling", - Execute: func(ctx context.Context, framework *IntegrationTestFramework) error { + Execute: func(_ context.Context, _ *IntegrationTestFramework) error { // Allocate some memory _ = make([]byte, 1024*1024) // 1MB return nil @@ -403,10 +403,10 @@ func TestIntegrationTestFramework_BenchmarkErrorHandling(t *testing.T) { errorBenchmark := Benchmark{ Name: "ErrorBenchmark", Description: "A benchmark with setup error", - Setup: func(ctx context.Context, framework *IntegrationTestFramework) error { + Setup: func(_ context.Context, _ *IntegrationTestFramework) error { return fmt.Errorf("setup error") }, - Execute: func(ctx context.Context, framework *IntegrationTestFramework) BenchmarkResult { + Execute: func(_ context.Context, _ *IntegrationTestFramework) BenchmarkResult { return BenchmarkResult{OperationsPerSecond: 1000} }, }