grntest 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fc4b8ad50b9380d89b7e00d312afdfd95a09cd0
4
- data.tar.gz: ada70512822106409a4c74293b3311d96cce5031
3
+ metadata.gz: 918e4ad9c8dff964b3ed84306ab5b8c732f7e955
4
+ data.tar.gz: badb1c9d6184a8b06bdcf5a31ea0b3a522af6d8b
5
5
  SHA512:
6
- metadata.gz: ee26ec65b89cbbbf721b89377f3e1afe307dbec61efb4ee5f681fe6f403f2e07c213a982174aee17b2be7a580d0a53a591af6ae87aadc20034cf4b2362ecccbe
7
- data.tar.gz: 0bb94869865c873894a9b3bfeafba3b1522c3570137b42ffc8fe92c62f73a67acc9c693334e101c17f88d50bc8e036a17a821bfe6aed8a3d5e30852d9ec5b38c
6
+ metadata.gz: 5efc50e1de933eaa6f5ca269557671aeb74b53c3cad944a658da036bb2efb8228c8b43e768945a8fbc01595d881271de627980876943cd6fb1a6534624a061b2
7
+ data.tar.gz: 5a77064a41d9990c0acfe3bb89e90a000989fd9765411713a4efa9b2eb2066dc9fd7fa39080490ea771c4a313e6ad09d2e32ad6243c8fb93bda402f1349a37f5
data/doc/text/news.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 1.2.9: 2018-01-18
4
+
5
+ ### Improvements
6
+
7
+ * Added `logical_table_remove` to "may slow commands".
8
+
9
+ * Added `--read-timeout` option.
10
+
3
11
  ## 1.2.8: 2017-12-04
4
12
 
5
13
  ### Improvements
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,9 @@ module Grntest
23
23
  attr_accessor :on_error
24
24
  attr_accessor :abort_tag
25
25
  attr_accessor :timeout
26
+ attr_accessor :read_timeout
26
27
  attr_accessor :default_timeout
28
+ attr_accessor :default_read_timeout
27
29
  attr_writer :suppress_backtrace
28
30
  attr_writer :collect_query_log
29
31
  attr_writer :debug
@@ -41,7 +43,9 @@ module Grntest
41
43
  @on_error = :default
42
44
  @abort_tag = nil
43
45
  @timeout = 0
44
- @default_timeout = 0
46
+ @read_timeout = 3
47
+ @default_timeout = @timeout
48
+ @default_read_timeout = @read_timeout
45
49
  @omitted = false
46
50
  @suppress_backtrace = true
47
51
  @collect_query_log = false
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -39,9 +39,7 @@ module Grntest
39
39
  @loading = false
40
40
  @pending_command = ""
41
41
  @pending_load_command = nil
42
- @current_command_name = nil
43
42
  @output_type = nil
44
- @read_timeout = default_read_timeout
45
43
  @long_read_timeout = default_long_read_timeout
46
44
  @context = context
47
45
  @custom_important_log_levels = []
@@ -223,8 +221,8 @@ module Grntest
223
221
  new_value = timeout_value("read-timeout",
224
222
  line,
225
223
  timeout,
226
- default_read_timeout)
227
- @read_timeout = new_value unless new_value.nil?
224
+ @context.default_read_timeout)
225
+ @context.read_timeout = new_value unless new_value.nil?
228
226
  end
229
227
 
230
228
  def execute_directive_long_read_timeout(line, content, options)
@@ -441,7 +439,7 @@ module Grntest
441
439
 
442
440
  def read_all_readable_content(output, options={})
443
441
  content = ""
444
- first_timeout = options[:first_timeout] || @read_timeout
442
+ first_timeout = options[:first_timeout] || @context.read_timeout
445
443
  timeout = first_timeout
446
444
  while IO.select([output], [], [], timeout)
447
445
  break if output.eof?
@@ -552,10 +550,6 @@ module Grntest
552
550
  output
553
551
  end
554
552
 
555
- def default_read_timeout
556
- 3
557
- end
558
-
559
553
  def default_long_read_timeout
560
554
  180
561
555
  end
@@ -1,6 +1,4 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
4
2
  #
5
3
  # This program is free software: you can redistribute it and/or modify
6
4
  # it under the terms of the GNU General Public License as published by
@@ -65,6 +63,7 @@ module Grntest
65
63
  MAY_SLOW_COMMANDS = [
66
64
  "column_create",
67
65
  "load",
66
+ "logical_table_remove",
68
67
  "plugin_register",
69
68
  "register",
70
69
  ]
@@ -140,7 +140,9 @@ module Grntest
140
140
  context.output_type = @tester.output_type
141
141
  context.timeout = @tester.timeout
142
142
  context.timeout = 0 if @tester.gdb
143
+ context.read_timeout = @tester.read_timeout
143
144
  context.default_timeout = context.timeout
145
+ context.default_read_timeout = context.read_timeout
144
146
  context.suppress_backtrace = @tester.suppress_backtrace?
145
147
  context.debug = @tester.debug?
146
148
  run_groonga(context) do |executor|
@@ -218,6 +218,12 @@ module Grntest
218
218
  tester.timeout = timeout
219
219
  end
220
220
 
221
+ parser.on("--read-timeout=SECOND", Float,
222
+ "Timeout for each read in test",
223
+ "(#{tester.read_timeout})") do |timeout|
224
+ tester.read_timeout = timeout
225
+ end
226
+
221
227
  parser.on("--[no-]debug",
222
228
  "Enable debug information",
223
229
  "(#{tester.debug?})") do |debug|
@@ -266,6 +272,7 @@ module Grntest
266
272
  attr_accessor :gdb, :default_gdb
267
273
  attr_accessor :valgrind, :default_valgrind
268
274
  attr_accessor :timeout
275
+ attr_accessor :read_timeout
269
276
  attr_writer :valgrind_gen_suppressions
270
277
  attr_writer :reporter, :keep_database, :use_color
271
278
  attr_writer :stop_on_failure
@@ -303,6 +310,7 @@ module Grntest
303
310
  initialize_debuggers
304
311
  initialize_memory_checkers
305
312
  @timeout = 5
313
+ @read_timeout = 3
306
314
  end
307
315
 
308
316
  def run(*targets)
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.2.8"
17
+ VERSION = "1.2.9"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grntest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-12-04 00:00:00.000000000 Z
12
+ date: 2018-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  version: '0'
220
220
  requirements: []
221
221
  rubyforge_project:
222
- rubygems_version: 2.5.2.1
222
+ rubygems_version: 2.5.2.2
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Grntest is a testing framework for Groonga. You can write a test for Groonga