MCPcopy Create free account
hub / github.com/ceph/ceph / TEST_F

Function TEST_F

src/test/test_snap_mapper.cc:395–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393};
394
395TEST_F(MapCacherTest, Simple)
396{
397 driver->pause();
398 map<string, bufferlist> truth;
399 set<string> truth_keys;
400 string blah("asdf");
401 bufferlist bl;
402 encode(blah, bl);
403 truth[string("asdf")] = bl;
404 truth_keys.insert(truth.begin()->first);
405 {
406 PausyAsyncMap::Transaction t;
407 cache->set_keys(truth, &t);
408 driver->submit(&t);
409 cache->set_keys(truth, &t);
410 driver->submit(&t);
411 }
412
413 map<string, bufferlist> got;
414 cache->get_keys(truth_keys, &got);
415 assert_bl_map_eq(got, truth);
416
417 driver->resume();
418 sleep(1);
419
420 got.clear();
421 cache->get_keys(truth_keys, &got);
422 assert_bl_map_eq(got, truth);
423}
424
425TEST_F(MapCacherTest, Random)
426{

Callers

nothing calls this directly

Calls 15

test_prefix_itrMethod · 0.80
test_prefix_itr2Method · 0.80
test_prefix_itr_randMethod · 0.80
add_oidMethod · 0.80
shorten_mapping_keyMethod · 0.80
encodeFunction · 0.50
getFunction · 0.50
removeFunction · 0.50
to_stringFunction · 0.50
initFunction · 0.50
runFunction · 0.50
pauseMethod · 0.45

Tested by

no test coverage detected