Commit 3e304c2
authored
test: Fix Sidekiq NameError ActiveJob (#1425)
Sidekiq v7.3.9 fixed a load ordering problem where it was requiring its ActiveJob Adapter too early:
sidekiq/sidekiq@886e434
Our tests relied on this load ordering bug so the suite started failing:
https://github.com/open-telemetry/opentelemetry-ruby-contrib/actions/runs/13447267345/job/37575230194
```console
/opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/sidekiq-7.3.9/lib/active_job/queue_adapters/sidekiq_adapter.rb:71:in '<class:SidekiqAdapter>': uninitialized constant Sidekiq::ActiveJob (NameError)
class JobWrapper < Sidekiq::ActiveJob::Wrapper
```
This change borrows from Sidekiq's test suite to ensure the Rails integration is loaded: https://github.com/sidekiq/sidekiq/blob/main/test/helper.rb#L751 parent 7c04e40 commit 3e304c2
File tree
2 files changed
+4
-3
lines changed- instrumentation/sidekiq
- test
2 files changed
+4
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments