From 5fd9f6c60cb692bdc7bbc64b1bdbe5cb57246ba3 Mon Sep 17 00:00:00 2001 From: Ulysse Buonomo Date: Thu, 5 Sep 2024 11:12:02 +0200 Subject: [PATCH] enable_ext analysis --- .github/workflows/tests.yml | 5 +++++ test/test_helper.rb | 20 +++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4d1419ad..7acc60e2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,6 +8,11 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# This allows a subsequently queued workflow run to interrupt previous runs. +concurrency: + group: "${{ github.workflow }} @ ${{ github.ref }}" + cancel-in-progress: true + jobs: # Since the name of the matrix job depends on the version, we define another job with a more stable name. test_results: diff --git a/test/test_helper.rb b/test/test_helper.rb index 0f326de6..51c8102b 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -84,9 +84,27 @@ def time_it end end -module ActiveSupport + +module DebugSlowTests + def enable_extension!(...) + t0 = Minitest.clock_time + super + puts "enable_extension! took #{Minitest.clock_time - t0} seconds" + end + + def disable_extension!(...) + t0 = Minitest.clock_time + super + puts "disable_extension! took #{Minitest.clock_time - t0} seconds" + end +end + + +module ActiveRecord class TestCase include TestTimeoutHelper + include DebugSlowTests + extend DebugSlowTests def factory(srid: 3785) RGeo::Cartesian.preferred_factory(srid: srid)