@@ -257,24 +257,26 @@ def execute
257257 end
258258
259259 def test_info
260+ # The hash is round-tripped through the data converter so non-primitive
261+ # values (Time, RetryPolicy) are serialized to strings. Use string keys
262+ # from the deserialized JSON to check values directly.
260263 info_hash = execute_activity ( InfoActivity )
261- info = Temporalio ::Activity ::Info . new ( **info_hash ) # steep:ignore
262- refute_nil info . activity_id
263- assert_equal 'InfoActivity' , info . activity_type
264- assert_equal 1 , info . attempt
265- refute_nil info . current_attempt_scheduled_time
266- assert_equal false , info . local?
267- refute_nil info . retry_policy
268- refute_nil info . schedule_to_close_timeout
269- refute_nil info . scheduled_time
270- refute_nil info . start_to_close_timeout
271- refute_nil info . started_time
272- refute_nil info . task_queue
273- refute_nil info . task_token
274- refute_nil info . workflow_id
275- assert_equal env . client . namespace , info . workflow_namespace
276- refute_nil info . workflow_run_id
277- assert_equal 'kitchen_sink' , info . workflow_type
264+ refute_nil info_hash [ 'activity_id' ]
265+ assert_equal 'InfoActivity' , info_hash [ 'activity_type' ]
266+ assert_equal 1 , info_hash [ 'attempt' ]
267+ refute_nil info_hash [ 'current_attempt_scheduled_time' ]
268+ assert_equal false , info_hash [ 'local?' ]
269+ refute_nil info_hash [ 'retry_policy' ]
270+ refute_nil info_hash [ 'schedule_to_close_timeout' ]
271+ refute_nil info_hash [ 'scheduled_time' ]
272+ refute_nil info_hash [ 'start_to_close_timeout' ]
273+ refute_nil info_hash [ 'started_time' ]
274+ refute_nil info_hash [ 'task_queue' ]
275+ refute_nil info_hash [ 'task_token' ]
276+ refute_nil info_hash [ 'workflow_id' ]
277+ assert_equal env . client . namespace , info_hash [ 'workflow_namespace' ]
278+ refute_nil info_hash [ 'workflow_run_id' ]
279+ assert_equal 'kitchen_sink' , info_hash [ 'workflow_type' ]
278280 end
279281
280282 class CancellationActivity < Temporalio ::Activity ::Definition
0 commit comments