mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
Merge pull request #1996 from molecula/fb-1281
[FB-1281] Add regression test for delete with invalid bitmap panic
This commit is contained in:
commit
f23d30deb4
1 changed files with 11 additions and 0 deletions
|
|
@ -221,6 +221,17 @@ func TestExecutor_DeleteRecords(t *testing.T) {
|
|||
after := convert(m.Columns)
|
||||
require.Equal([]uint64{0, 1}, after, "these records should be remaining")
|
||||
})
|
||||
|
||||
// FB-1281: Delete() calls with an invalid bitmap filter would cause a panic.
|
||||
// This test validates that the error is correctly propagated to the caller.
|
||||
t.Run("DeleteWithBitmapError", func(t *testing.T) {
|
||||
setup(t, require, c)
|
||||
defer tearDown(t, require, c)
|
||||
_, err := c.GetPrimary().API.Query(context.Background(), &pilosa.QueryRequest{Index: indexName, Query: `Delete(Row(setfield == 1))`})
|
||||
if err == nil || err.Error() != `executing: executeDelete: mapping on primary node: bsigroup not found` {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
})
|
||||
})
|
||||
t.Run("DeleteRecordsBigWithRestart", func(t *testing.T) {
|
||||
c := test.MustNewCluster(t, 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue