Kouhei Sutou
null+****@clear*****
Mon Jan 25 15:13:19 JST 2016
Kouhei Sutou 2016-01-25 15:13:19 +0900 (Mon, 25 Jan 2016) New Revision: c377d76f7283c1ff1c0a4e84f07c27c7840528a5 https://github.com/groonga/groonga/commit/c377d76f7283c1ff1c0a4e84f07c27c7840528a5 Message: test grndb check: add a test for locked data column case Modified files: test/command_line/suite/grndb/test_check.rb Modified: test/command_line/suite/grndb/test_check.rb (+12 -0) =================================================================== --- test/command_line/suite/grndb/test_check.rb 2016-01-25 15:10:54 +0900 (e78d0c3) +++ test/command_line/suite/grndb/test_check.rb 2016-01-25 15:13:19 +0900 (5a5d63d) @@ -22,4 +22,16 @@ Database is locked. It may be broken. Re-create the database. [Users] Table is locked. It may be broken. (1) Truncate the table (truncate Users) or clear lock of the table (lock_clear Users) and (2) load data again. MESSAGE end + + def test_locked_data_column + groonga("table_create", "Users", "TABLE_HASH_KEY", "ShortText") + groonga("column_create", "Users", "age", "COLUMN_SCALAR", "UInt8") + groonga("lock_acquire", "Users.age") + error = assert_raise(CommandRunner::Error) do + grndb("check") + end + assert_equal(<<-MESSAGE, error.error_output) +[Users.age] Data column is locked. It may be broken. (1) Truncate the column (truncate Users.age) or clear lock of the column (lock_clear Users.age) and (2) load data again. + MESSAGE + end end -------------- next part -------------- HTML����������������������������...Download