[Groonga-commit] groonga/groonga at bebce1a [master] grndb: add test for --force-lock-clear option

Back to archive index

Yasuhiro Horimoto null+****@clear*****
Wed Jan 10 19:00:27 JST 2018


Yasuhiro Horimoto	2018-01-10 19:00:27 +0900 (Wed, 10 Jan 2018)

  New Revision: bebce1a3a568c78b2548240944fe15ae3c2b7bcd
  https://github.com/groonga/groonga/commit/bebce1a3a568c78b2548240944fe15ae3c2b7bcd

  Merged f6ed615: Merge pull request #807 from komainu8/add_force_lock_clear

  Message:
    grndb: add test for --force-lock-clear option

  Modified files:
    test/command_line/suite/grndb/test_recover.rb

  Modified: test/command_line/suite/grndb/test_recover.rb (+21 -0)
===================================================================
--- test/command_line/suite/grndb/test_recover.rb    2018-01-10 16:31:22 +0900 (7975fed76)
+++ test/command_line/suite/grndb/test_recover.rb    2018-01-10 19:00:27 +0900 (ed2185f34)
@@ -61,6 +61,27 @@ object corrupt: <[db][recover] column may be broken: <Users.age>: please truncat
     assert_equal("", result.error_output)
   end
 
+  def test_force_clear_locked_database
+    groonga("lock_acquire")
+    result = grndb("recover", "--force-lock-clear")
+    assert_equal("", result.error_output)
+  end
+
+  def test_force_clear_locked_table
+    groonga("table_create", "Users", "TABLE_HASH_KEY", "ShortText")
+    groonga("lock_acquire", "Users")
+    result = grndb("recover", "--force-lock-clear")
+    assert_equal("", result.error_output)
+  end
+
+  def test_force_clear_locked_data_column
+    groonga("table_create", "Users", "TABLE_HASH_KEY", "ShortText")
+    groonga("column_create", "Users", "age", "COLUMN_SCALAR", "UInt8")
+    groonga("lock_acquire", "Users.age")
+    result = grndb("recover", "--force-lock-clear")
+    assert_equal("", result.error_output)
+  end
+
   def test_empty_file
     groonga("table_create", "Users", "TABLE_HASH_KEY", "ShortText")
     _id, _name, path, *_ = JSON.parse(groonga("table_list").output)[1][1]
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180110/4a86612b/attachment.htm 



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