Skip to content

Commit 72f7c6c

Browse files
Copilotjulienrbrt
andauthored
test(pruner): use t.Context() in test functions (#3077)
* Initial plan * Implement PR #3075 review comments: update test context usage and add regression test Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com> * Remove invalid regression test - DA inclusion height cannot exceed store height Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>
1 parent bec01ff commit 72f7c6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

block/internal/pruner/pruner_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (e *execMetaAdapter) PruneExec(ctx context.Context, height uint64) error {
3232
func TestPrunerPruneMetadata(t *testing.T) {
3333
t.Parallel()
3434

35-
ctx := context.Background()
35+
ctx := t.Context()
3636
kv := dssync.MutexWrap(ds.NewMapDatastore())
3737
stateStore := store.New(kv)
3838

@@ -67,7 +67,7 @@ func TestPrunerPruneMetadata(t *testing.T) {
6767
func TestPrunerPruneBlocksWithoutDA(t *testing.T) {
6868
t.Parallel()
6969

70-
ctx := context.Background()
70+
ctx := t.Context()
7171
kv := dssync.MutexWrap(ds.NewMapDatastore())
7272
stateStore := store.New(kv)
7373

@@ -128,7 +128,7 @@ func TestPrunerPruneBlocksWithoutDA(t *testing.T) {
128128
func TestPrunerPruneBlocksWithDAEnabled(t *testing.T) {
129129
t.Parallel()
130130

131-
ctx := context.Background()
131+
ctx := t.Context()
132132
kv := dssync.MutexWrap(ds.NewMapDatastore())
133133
stateStore := store.New(kv)
134134

0 commit comments

Comments
 (0)