e2e 0.7.2 → 0.7.3
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +5 -0
- data/gemfiles/rails_7.0.gemfile.lock +4 -3
- data/gemfiles/rails_7.1.gemfile.lock +4 -3
- data/gemfiles/rails_7.2.gemfile.lock +4 -3
- data/gemfiles/rails_8.0.gemfile.lock +4 -3
- data/gemfiles/rails_8.1.gemfile.lock +4 -3
- data/lib/e2e/server.rb +26 -0
- data/lib/e2e/version.rb +1 -1
- data/lib/e2e.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 054a523b511bfbd8e1798c0b4733161b29a2a65938b8697266e36f8f63c7207e
|
|
4
|
+
data.tar.gz: f27d6c894f7dfeaa3626274b6dab9819de23f7249980a69f783e3740f86f62cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4318374aef6f2f4fbcdff1c5019d9122ee8bdc3843bf96181c1aee9733f34c882b9c9ee9a38fff3714dd64a8a761b70f5d2fb36e49643b69591822861034f294
|
|
7
|
+
data.tar.gz: 76cd349a59d5fe14f44e06d9c6c65f711e7eea2feb8c6806369d5e4457b3e2c149af43fef43d5a70fdbfeb49273fb043074b2cd4225af473f6fb847c3ab46da8
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.3] - 2026-08-20
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `E2E::Server` eager loads a Rails app (once, before the in-process WEBrick thread starts) to close a rare full-process deadlock: Zeitwerk's per-loader autoload monitor and Ruby's own internal `require` lock can deadlock each other (a classic lock-ordering inversion) when the server thread and the caller's thread each reference a not-yet-loaded app constant for the first time at the same moment. The process idles at ~0% CPU forever with no exception raised. Only reproduces when `config.eager_load` is off (the common local-dev/test setting; CI setups that force eager loading were never affected). Opt out with `config.eager_load_app = false`.
|
|
15
|
+
|
|
10
16
|
## [0.7.2] - 2026-08-13
|
|
11
17
|
|
|
12
18
|
### Added
|
data/README.md
CHANGED
|
@@ -339,6 +339,11 @@ E2E.configure do |config|
|
|
|
339
339
|
# Vite / Inertia: ensure public/vite-test is fresh before the suite
|
|
340
340
|
# :auto (default) | :build | :warn | :skip — or SKIP_VITE_TEST_BUILD=1
|
|
341
341
|
config.ensure_vite_assets = :auto
|
|
342
|
+
# Eager load a Rails app (once) before the in-process server thread starts.
|
|
343
|
+
# Prevents a rare deadlock where that thread and the caller's thread race to
|
|
344
|
+
# autoload the same app constant for the first time. Leave this on unless
|
|
345
|
+
# eager loading your app is itself broken. Default: true
|
|
346
|
+
config.eager_load_app = true
|
|
342
347
|
config.flash_selectors = {
|
|
343
348
|
any: "[role='alert'], [role='status'], .flash",
|
|
344
349
|
notice: "[role='status'], .flash.notice",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
e2e (0.7.
|
|
4
|
+
e2e (0.7.3)
|
|
5
5
|
playwright-ruby-client (>= 1.40.0)
|
|
6
6
|
rack
|
|
7
7
|
rackup
|
|
@@ -333,12 +333,13 @@ CHECKSUMS
|
|
|
333
333
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
334
334
|
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
335
335
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
336
|
+
bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
|
|
336
337
|
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
337
338
|
crass (1.0.7) sha256=94868719948664c89ddcaf0a37c65048413dfcb1c869470a5f7a7ceb5390b295
|
|
338
339
|
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
339
340
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
340
341
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
341
|
-
e2e (0.7.
|
|
342
|
+
e2e (0.7.3)
|
|
342
343
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
343
344
|
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
344
345
|
globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427
|
|
@@ -421,4 +422,4 @@ CHECKSUMS
|
|
|
421
422
|
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5
|
|
422
423
|
|
|
423
424
|
BUNDLED WITH
|
|
424
|
-
4.0.
|
|
425
|
+
4.0.16
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
e2e (0.7.
|
|
4
|
+
e2e (0.7.3)
|
|
5
5
|
playwright-ruby-client (>= 1.40.0)
|
|
6
6
|
rack
|
|
7
7
|
rackup
|
|
@@ -350,6 +350,7 @@ CHECKSUMS
|
|
|
350
350
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
351
351
|
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
352
352
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
353
|
+
bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
|
|
353
354
|
cgi (0.5.2) sha256=61ca30298171190fd4fa0d8018e57ada456eae9b7a2b78526debf7f0a0e6f8bb
|
|
354
355
|
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
355
356
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
@@ -357,7 +358,7 @@ CHECKSUMS
|
|
|
357
358
|
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
358
359
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
359
360
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
360
|
-
e2e (0.7.
|
|
361
|
+
e2e (0.7.3)
|
|
361
362
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
362
363
|
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
363
364
|
globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427
|
|
@@ -446,4 +447,4 @@ CHECKSUMS
|
|
|
446
447
|
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5
|
|
447
448
|
|
|
448
449
|
BUNDLED WITH
|
|
449
|
-
4.0.
|
|
450
|
+
4.0.16
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
e2e (0.7.
|
|
4
|
+
e2e (0.7.3)
|
|
5
5
|
playwright-ruby-client (>= 1.40.0)
|
|
6
6
|
rack
|
|
7
7
|
rackup
|
|
@@ -344,6 +344,7 @@ CHECKSUMS
|
|
|
344
344
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
345
345
|
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
346
346
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
347
|
+
bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
|
|
347
348
|
cgi (0.5.2) sha256=61ca30298171190fd4fa0d8018e57ada456eae9b7a2b78526debf7f0a0e6f8bb
|
|
348
349
|
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
349
350
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
@@ -351,7 +352,7 @@ CHECKSUMS
|
|
|
351
352
|
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
352
353
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
353
354
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
354
|
-
e2e (0.7.
|
|
355
|
+
e2e (0.7.3)
|
|
355
356
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
356
357
|
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
357
358
|
globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427
|
|
@@ -440,4 +441,4 @@ CHECKSUMS
|
|
|
440
441
|
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5
|
|
441
442
|
|
|
442
443
|
BUNDLED WITH
|
|
443
|
-
4.0.
|
|
444
|
+
4.0.16
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
e2e (0.7.
|
|
4
|
+
e2e (0.7.3)
|
|
5
5
|
playwright-ruby-client (>= 1.40.0)
|
|
6
6
|
rack
|
|
7
7
|
rackup
|
|
@@ -341,13 +341,14 @@ CHECKSUMS
|
|
|
341
341
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
342
342
|
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
343
343
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
344
|
+
bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
|
|
344
345
|
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
345
346
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
346
347
|
crass (1.0.7) sha256=94868719948664c89ddcaf0a37c65048413dfcb1c869470a5f7a7ceb5390b295
|
|
347
348
|
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
348
349
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
349
350
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
350
|
-
e2e (0.7.
|
|
351
|
+
e2e (0.7.3)
|
|
351
352
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
352
353
|
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
353
354
|
globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427
|
|
@@ -437,4 +438,4 @@ CHECKSUMS
|
|
|
437
438
|
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5
|
|
438
439
|
|
|
439
440
|
BUNDLED WITH
|
|
440
|
-
4.0.
|
|
441
|
+
4.0.16
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
e2e (0.7.
|
|
4
|
+
e2e (0.7.3)
|
|
5
5
|
playwright-ruby-client (>= 1.40.0)
|
|
6
6
|
rack
|
|
7
7
|
rackup
|
|
@@ -343,13 +343,14 @@ CHECKSUMS
|
|
|
343
343
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
344
344
|
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
345
345
|
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
|
|
346
|
+
bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
|
|
346
347
|
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
347
348
|
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
348
349
|
crass (1.0.7) sha256=94868719948664c89ddcaf0a37c65048413dfcb1c869470a5f7a7ceb5390b295
|
|
349
350
|
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
|
|
350
351
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
351
352
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
352
|
-
e2e (0.7.
|
|
353
|
+
e2e (0.7.3)
|
|
353
354
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
354
355
|
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
355
356
|
globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427
|
|
@@ -439,4 +440,4 @@ CHECKSUMS
|
|
|
439
440
|
zeitwerk (2.8.3) sha256=2c85125a8467ce069e20123d1e709a08955c9d29c118c25b46b7b7fafdbb92e5
|
|
440
441
|
|
|
441
442
|
BUNDLED WITH
|
|
442
|
-
4.0.
|
|
443
|
+
4.0.16
|
data/lib/e2e/server.rb
CHANGED
|
@@ -16,6 +16,7 @@ module E2E
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def start
|
|
19
|
+
eager_load_app!
|
|
19
20
|
@thread = Thread.new do
|
|
20
21
|
webrick_handler.run(
|
|
21
22
|
@app,
|
|
@@ -43,6 +44,31 @@ module E2E
|
|
|
43
44
|
|
|
44
45
|
private
|
|
45
46
|
|
|
47
|
+
# Zeitwerk's per-loader autoload monitor and Ruby's own internal `require`
|
|
48
|
+
# lock can deadlock each other (classic lock-ordering inversion) when two
|
|
49
|
+
# threads race to autoload the same not-yet-loaded app constant for the
|
|
50
|
+
# first time. That race is exactly what this gem sets up by design: the
|
|
51
|
+
# WEBrick thread servicing the very first request and the caller's thread
|
|
52
|
+
# (evaluating spec/support files, factories, etc.) can each reference a
|
|
53
|
+
# fresh app class at the same moment, one thread ends up mid-`require`
|
|
54
|
+
# holding Ruby's require lock while waiting on Zeitwerk's monitor, the
|
|
55
|
+
# other holds that monitor while waiting on the require lock -- neither
|
|
56
|
+
# ever proceeds, and the process idles at ~0% CPU forever.
|
|
57
|
+
#
|
|
58
|
+
# Eager loading synchronously on the caller's thread, before the server
|
|
59
|
+
# thread ever starts, guarantees no constant is loaded for the first time
|
|
60
|
+
# under concurrency, so the race can't occur. This mirrors what already
|
|
61
|
+
# happens for free in CI-style setups that force `config.eager_load = true`
|
|
62
|
+
# in the test environment -- local runs that leave eager loading off are
|
|
63
|
+
# exactly where this hang has been observed.
|
|
64
|
+
def eager_load_app!
|
|
65
|
+
return unless E2E.config.eager_load_app
|
|
66
|
+
return unless defined?(::Rails) && ::Rails.respond_to?(:application) && ::Rails.application
|
|
67
|
+
return if ::Rails.application.config.eager_load
|
|
68
|
+
|
|
69
|
+
::Rails.application.eager_load!
|
|
70
|
+
end
|
|
71
|
+
|
|
46
72
|
# rackup 2.x (the version paired with Rack 3) exposes Rackup::Handler.
|
|
47
73
|
# Older stacks that pin Rack 2.x (e.g. Rails 7.0/7.1 via this gem's own
|
|
48
74
|
# Appraisal matrix) resolve `rackup` down to its 1.x line, which has no
|
data/lib/e2e/version.rb
CHANGED
data/lib/e2e.rb
CHANGED
|
@@ -68,7 +68,7 @@ module E2E
|
|
|
68
68
|
}.freeze
|
|
69
69
|
|
|
70
70
|
attr_accessor :driver, :headless, :app, :browser_type, :wait_timeout, :flash_selectors,
|
|
71
|
-
:navigation_timeout, :navigation_wait_until, :ensure_vite_assets
|
|
71
|
+
:navigation_timeout, :navigation_wait_until, :ensure_vite_assets, :eager_load_app
|
|
72
72
|
|
|
73
73
|
def initialize
|
|
74
74
|
@driver = :playwright
|
|
@@ -83,6 +83,9 @@ module E2E
|
|
|
83
83
|
@flash_selectors = DEFAULT_FLASH_SELECTORS.dup
|
|
84
84
|
# :auto builds when ViteRuby is loaded; :build requires it; :warn / :skip
|
|
85
85
|
@ensure_vite_assets = :auto
|
|
86
|
+
# See Server#eager_load_app! for why this defaults on. Set to false only
|
|
87
|
+
# if eager loading the host app is itself broken or unacceptably slow.
|
|
88
|
+
@eager_load_app = true
|
|
86
89
|
end
|
|
87
90
|
end
|
|
88
91
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: e2e
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexey Poimtsev
|
|
@@ -286,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
286
286
|
- !ruby/object:Gem::Version
|
|
287
287
|
version: '0'
|
|
288
288
|
requirements: []
|
|
289
|
-
rubygems_version: 4.0.
|
|
289
|
+
rubygems_version: 4.0.19
|
|
290
290
|
specification_version: 4
|
|
291
291
|
summary: Unified E2E testing framework for Ruby.
|
|
292
292
|
test_files: []
|