File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -172,17 +172,22 @@ func TestChunkDataPacks_BatchRemoveChunkDataPacksOnly(t *testing.T) {
172172
173173 // Prepare chunk IDs for removal
174174 chunkIDs := make ([]flow.Identifier , len (chunkDataPacks ))
175+ chunkDataPackIDs := make ([]flow.Identifier , len (chunkDataPacks ))
175176 for i , chunkDataPack := range chunkDataPacks {
176177 chunkIDs [i ] = chunkDataPack .ChunkID
178+ chunkDataPackIDs = append (chunkDataPackIDs , chunkDataPack .ID ())
177179 }
178180
179181 // Test BatchRemoveChunkDataPacksOnly - verify it can be called without error
180182 require .NoError (t , chunkDataPackDB .WithReaderBatchWriter (func (chunkDataPackDBBatch storage.ReaderBatchWriter ) error {
181183 return chunkDataPackStore .BatchRemoveChunkDataPacksOnly (chunkIDs , chunkDataPackDBBatch )
182184 }))
183185
184- // Note: The exact behavior after removal may depend on caching and implementation details
185- // The main test is that the method can be called without error
186+ // Verify the chunk data packs have been removed from chunk data pack DB
187+ for _ , id := range chunkDataPackIDs {
188+ _ , err := stored .ByID (id )
189+ assert .ErrorIs (t , err , storage .ErrNotFound )
190+ }
186191 })
187192 })
188193}
You can’t perform that action at this time.
0 commit comments