[Groonga-commit] groonga/groonga at 4206af7 [master] test: stop to use memory file system for tests that create large DB

Back to archive index
Kouhei Sutou null+****@clear*****
Wed Nov 7 15:14:41 JST 2018


Kouhei Sutou	2018-11-07 15:14:41 +0900 (Wed, 07 Nov 2018)

  Revision: 4206af77fb24fb964626536392d9cf02f9076fd6
  https://github.com/groonga/groonga/commit/4206af77fb24fb964626536392d9cf02f9076fd6

  Message:
    test: stop to use memory file system for tests that create large DB

  Modified files:
    test/command_line/helper/sandbox.rb
    test/command_line/suite/grndb/test_check.rb

  Modified: test/command_line/helper/sandbox.rb (+8 -0)
===================================================================
--- test/command_line/helper/sandbox.rb    2018-11-06 16:59:36 +0900 (69b4716e2)
+++ test/command_line/helper/sandbox.rb    2018-11-07 15:14:41 +0900 (9b2cb6542)
@@ -30,6 +30,14 @@ module Sandbox
     @error_output_log_path = @tmp_dir + "error-output.log"
   end
 
+  def use_large_tmp_dir
+    if @base_tmp_dir.symlink?
+      FileUtils.rm_rf(@tmp_dir.to_s)
+      FileUtils.rm_rf(@base_tmp_dir.to_s)
+      FileUtils.mkdir_p(@tmp_dir.to_s)
+    end
+  end
+
   def setup_database_path
     name_for_path = name.gsub(/[\(\)\[\]: ]/, "-")
     @database_path = @tmp_dir + "#{name_for_path}.db"

  Modified: test/command_line/suite/grndb/test_check.rb (+2 -0)
===================================================================
--- test/command_line/suite/grndb/test_check.rb    2018-11-06 16:59:36 +0900 (e5ce63984)
+++ test/command_line/suite/grndb/test_check.rb    2018-11-07 15:14:41 +0900 (640166466)
@@ -170,6 +170,7 @@ load --table Users
   end
 
   def test_corrupt_table
+    use_large_tmp_dir
     groonga("table_create", "Users", "TABLE_HASH_KEY", "ShortText")
     groonga do |external_process|
       external_process.input.puts("load --table Users")
@@ -209,6 +210,7 @@ load --table Users
   end
 
   def test_corrupt_data_column
+    use_large_tmp_dir
     groonga("table_create", "Data", "TABLE_NO_KEY")
     groonga("column_create", "Data", "text", "COLUMN_SCALAR", "Text")
     groonga do |external_process|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181107/ee85eaf0/attachment.html>


More information about the Groonga-commit mailing list
Back to archive index