]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados: add ASSERT_EQ & ASSERT_NE judgment 9694/head
authorrenhwztetecs <sky@renhuanwentekiMacBook-Pro.local>
Tue, 14 Jun 2016 15:21:04 +0000 (23:21 +0800)
committerrenhwztetecs <sky@renhuanwentekiMacBook-Pro.local>
Tue, 14 Jun 2016 15:21:04 +0000 (23:21 +0800)
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
src/test/librados/io.cc

index 97bde5e5dcca92d85a257033ff31a38e6a15a8cf..92c69530566b00218c870360710b7507388df040 100644 (file)
@@ -50,12 +50,12 @@ TEST_F(LibRadosIo, ReadTimeout) {
     // set up a second client
     rados_t cluster;
     rados_ioctx_t ioctx;
-    rados_create(&cluster, "admin");
-    rados_conf_read_file(cluster, NULL);
-    rados_conf_parse_env(cluster, NULL);
-    rados_conf_set(cluster, "rados_osd_op_timeout", "0.00001"); // use any small value that will result in a timeout
-    rados_connect(cluster);
-    rados_ioctx_create(cluster, pool_name.c_str(), &ioctx);
+    ASSERT_EQ(0, rados_create(&cluster, "admin"));
+    ASSERT_EQ(0, rados_conf_read_file(cluster, NULL));
+    ASSERT_EQ(0, rados_conf_parse_env(cluster, NULL));
+    ASSERT_EQ(0, rados_conf_set(cluster, "rados_osd_op_timeout", "0.00001")); // use any small value that will result in a timeout
+    ASSERT_NE(0, rados_connect(cluster));
+    ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx));
     rados_ioctx_set_namespace(ioctx, nspace.c_str());
 
     // then we show that the buffer is changed after rados_read returned