1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: mismatch new-delete in unit test (#4288)

This commit is contained in:
Shahar Mike 2024-12-11 10:30:58 +02:00 committed by GitHub
parent 5fee668391
commit e63613f5ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -578,7 +578,7 @@ TEST_F(CompactObjectTest, DefragHash) {
TEST_F(CompactObjectTest, DefragSet) { TEST_F(CompactObjectTest, DefragSet) {
// This is still not implemented // This is still not implemented
StringSet* s = new StringSet(); StringSet* s = CompactObj::AllocateMR<StringSet>();
s->Add("str"); s->Add("str");
cobj_.InitRobj(OBJ_SET, kEncodingStrMap2, s); cobj_.InitRobj(OBJ_SET, kEncodingStrMap2, s);
ASSERT_FALSE(cobj_.DefragIfNeeded(0.8)); ASSERT_FALSE(cobj_.DefragIfNeeded(0.8));