Skip to content

Commit f2d039b

Browse files
committed
MB-66783: Don't fail MemTrackingBucketTest if arena-debug already set
The test class forces CB_ARENA_MALLOC_VERIFY_DEALLOC_CLIENT, just continue test execution if that is already enabled in the environment. Change-Id: I1ef6f7d8a15c68be3221dd52a90f23bb08599f69 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/245423 Reviewed-by: Chirag Agarwal <chirag.agarwal@couchbase.com> Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Mohammad Zaeem <mohammad.zaeem@couchbase.com>
1 parent 9734623 commit f2d039b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/testapp/testapp_bucket.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,9 @@ class MemTrackingBucketTest : public BucketTest {
395395
// Note: Important to set the env BEFORE starting memcached,
396396
// env vars wouldn't be passed to the memcached process otherwise
397397
// (unless testapp is run in -e (embedded) mode)
398-
ASSERT_FALSE(getenv("CB_ARENA_MALLOC_VERIFY_DEALLOC_CLIENT"));
399-
ASSERT_EQ(0, setenv("CB_ARENA_MALLOC_VERIFY_DEALLOC_CLIENT", "1", 0));
398+
if (!getenv("CB_ARENA_MALLOC_VERIFY_DEALLOC_CLIENT")) {
399+
ASSERT_EQ(0, setenv("CB_ARENA_MALLOC_VERIFY_DEALLOC_CLIENT", "1", 0));
400+
}
400401
BucketTest::SetUpTestCase();
401402
}
402403

0 commit comments

Comments
 (0)