Skip to content

Commit

Permalink
test: fix timecop version to keep clock specs in tests
Browse files Browse the repository at this point in the history
timecop 0.9.9 supports `Process.clock_gettime`.
This breaks specifications of `process_extenstion` of Fluentd and
`Fluent::Clock`.

`Fluent::Clock` uses `CLOCK_MONOTONIC_RAW` if possible and it does not
be affected.
However, `CLOCK_MONOTONIC_RAW` is not available on Windows, so the
impact on tests on Windows is very significant.

For now, we should avoid this effect by fixing the version.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
  • Loading branch information
daipom committed Jun 6, 2024
1 parent 0d9f3a6 commit 57f821b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fluentd.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ Gem::Specification.new do |gem|
gem.add_development_dependency("parallel_tests", ["~> 0.15.3"])
gem.add_development_dependency("simplecov", ["~> 0.7"])
gem.add_development_dependency("rr", ["~> 3.0"])
gem.add_development_dependency("timecop", ["~> 0.9"])
# timecop v0.9.9 supports `Process.clock_gettime`. It breaks some tests.
# (https://github.com/fluent/fluentd/pull/4521)
gem.add_development_dependency("timecop", ["< 0.9.9"])
gem.add_development_dependency("test-unit", ["~> 3.3"])
gem.add_development_dependency("test-unit-rr", ["~> 1.0"])
gem.add_development_dependency("oj", [">= 2.14", "< 4"])
Expand Down

0 comments on commit 57f821b

Please sign in to comment.