From 57f821b194516fabd8b8d396842932126c6cbaf5 Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Thu, 6 Jun 2024 14:22:57 +0900 Subject: [PATCH] test: fix timecop version to keep clock specs in tests 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 --- fluentd.gemspec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fluentd.gemspec b/fluentd.gemspec index dc6f6b4e8f..e3ecf22f3c 100644 --- a/fluentd.gemspec +++ b/fluentd.gemspec @@ -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"])