@@ -135,7 +135,8 @@ defmodule Sentry.Integrations.Oban.CronTest do
135135 "type" => "interval" ,
136136 "value" => 1 ,
137137 "unit" => unquote ( expected_unit )
138- }
138+ } ,
139+ "timezone" => "Europe/Rome"
139140 }
140141
141142 send ( test_pid , { ref , :done } )
@@ -150,7 +151,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
150151 job: % Oban.Job {
151152 worker: "Sentry.MyWorker" ,
152153 id: 942 ,
153- meta: % { "cron" => true , "cron_expr" => unquote ( frequency ) }
154+ meta: % { "cron" => true , "cron_expr" => unquote ( frequency ) , "cron_tz" => "Europe/Rome" }
154155 }
155156 } )
156157
@@ -179,7 +180,8 @@ defmodule Sentry.Integrations.Oban.CronTest do
179180 "schedule" => % {
180181 "type" => "crontab" ,
181182 "value" => "* 1 1 1 1"
182- }
183+ } ,
184+ "timezone" => "Europe/Rome"
183185 }
184186
185187 send ( test_pid , { ref , :done } )
@@ -194,7 +196,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
194196 job: % Oban.Job {
195197 worker: "Sentry.MyWorker" ,
196198 id: 942 ,
197- meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" }
199+ meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" , "cron_tz" => "Europe/Rome" }
198200 }
199201 } )
200202
@@ -226,7 +228,8 @@ defmodule Sentry.Integrations.Oban.CronTest do
226228 "schedule" => % {
227229 "type" => "crontab" ,
228230 "value" => "* 1 1 1 1"
229- }
231+ } ,
232+ "timezone" => "Europe/Rome"
230233 }
231234
232235 send ( test_pid , { ref , :done } )
@@ -239,7 +242,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
239242 job: % Oban.Job {
240243 worker: "Sentry.MyWorker" ,
241244 id: 942 ,
242- meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" }
245+ meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" , "cron_tz" => "Europe/Rome" }
243246 }
244247 } )
245248
@@ -265,7 +268,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
265268 job: % Oban.Job {
266269 worker: "Sentry.MyWorker" ,
267270 id: 123 ,
268- meta: % { "cron" => true , "cron_expr" => "@daily" }
271+ meta: % { "cron" => true , "cron_expr" => "@daily" , "cron_tz" => "Europe/Rome" }
269272 }
270273 } )
271274
@@ -293,14 +296,14 @@ defmodule Sentry.Integrations.Oban.CronTest do
293296 worker: "Sentry.ClientWorker" ,
294297 id: 123 ,
295298 args: % { "client" => client_name } ,
296- meta: % { "cron" => true , "cron_expr" => "@daily" }
299+ meta: % { "cron" => true , "cron_expr" => "@daily" , "cron_tz" => "Europe/Rome" }
297300 }
298301 } )
299302
300303 assert_receive { ^ ref , :done } , 1000
301304 end
302305
303- test "custom options" , % { bypass: bypass } do
306+ test "custom options overide job metadata " , % { bypass: bypass } do
304307 test_pid = self ( )
305308 ref = make_ref ( )
306309
@@ -339,7 +342,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
339342 worker: inspect ( WorkerWithCustomOptions ) ,
340343 id: 123 ,
341344 args: % { } ,
342- meta: % { "cron" => true , "cron_expr" => "@daily" }
345+ meta: % { "cron" => true , "cron_expr" => "@daily" , "cron_tz" => "America/Chicago" }
343346 }
344347 } )
345348
0 commit comments