]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ErasureCode: fix plugin loading threaded test 628/head
authorLoic Dachary <loic@dachary.org>
Tue, 24 Sep 2013 13:51:08 +0000 (15:51 +0200)
committerLoic Dachary <loic@dachary.org>
Tue, 24 Sep 2013 14:07:31 +0000 (16:07 +0200)
commit4bc18189b14d43a48d4cb6eff80bc8e9d3a59e8f
tree997bebee0a295195daf4ac2473993838e53e3939
parent08c386f54254bb5652d811e4caf339b619a39109
ErasureCode: fix plugin loading threaded test

The TEST_F(ErasureCodePluginRegistryTest, factory_mutex) was bugous and
only succeeded by chance. The sleep was on the factory constructor which
was never called. An erasure code plugin that hangs forever on load is
created instead.

The sleep_forever.detach is replaced by pthread_cancel to interrupt the
thread that hangs forever. If not, gtest will try to join the thread and
never exit.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/Makefile.am
src/test/osd/ErasureCodeExample.h
src/test/osd/ErasureCodePluginExample.cc
src/test/osd/ErasureCodePluginHangs.cc [new file with mode: 0644]
src/test/osd/TestErasureCodeExample.cc
src/test/osd/TestErasureCodePlugin.cc