[Groonga-commit] groonga/groonga [master] remove catastrophic grn_init/fin() calls from cut_setup/teardown().

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 15日 (火) 20:00:41 JST


Susumu Yata	2011-11-15 11:00:41 +0000 (Tue, 15 Nov 2011)

  New Revision: 499002182291915da5fd827882d1d23380db8762

  Log:
    remove catastrophic grn_init/fin() calls from cut_setup/teardown().

  Modified files:
    test/unit/core/dat/test-dat-cursor.cpp
    test/unit/core/dat/test-dat.cpp

  Modified: test/unit/core/dat/test-dat-cursor.cpp (+0 -11)
===================================================================
--- test/unit/core/dat/test-dat-cursor.cpp    2011-11-15 10:19:26 +0000 (e870565)
+++ test/unit/core/dat/test-dat-cursor.cpp    2011-11-15 11:00:41 +0000 (4645e0f)
@@ -59,29 +59,18 @@ namespace
 
 namespace test_dat_cursor
 {
-  const char *base_dir;
   grn_ctx ctx;
 
   void cut_setup(void)
   {
     std::srand(static_cast<unsigned int>(std::time(NULL)));
 
-    base_dir = grn_test_get_tmp_dir();
-    cut_remove_path(base_dir, NULL);
-    g_mkdir_with_parents(base_dir, 0755);
-
-    grn_init();
     grn_ctx_init(&ctx, 0);
   }
 
   void cut_teardown(void)
   {
     grn_ctx_fin(&ctx);
-    grn_fin();
-
-    if (base_dir) {
-      cut_remove_path(base_dir, NULL);
-    }
   }
 
   grn_dat *create_trie(const std::vector<std::string> &keys) {

  Modified: test/unit/core/dat/test-dat.cpp (+0 -2)
===================================================================
--- test/unit/core/dat/test-dat.cpp    2011-11-15 10:19:26 +0000 (17172ce)
+++ test/unit/core/dat/test-dat.cpp    2011-11-15 11:00:41 +0000 (42488d1)
@@ -70,14 +70,12 @@ namespace test_dat
     cut_remove_path(base_dir, NULL);
     g_mkdir_with_parents(base_dir, 0755);
 
-    grn_init();
     grn_ctx_init(&ctx, 0);
   }
 
   void cut_teardown(void)
   {
     grn_ctx_fin(&ctx);
-    grn_fin();
 
     if (base_dir) {
       cut_remove_path(base_dir, NULL);




Groonga-commit メーリングリストの案内
Back to archive index