Skip to content

Commit 7eedc3e

Browse files
ryanzhu706mssonicbld
authored andcommitted
Fix advanced-rebootpy datetime EDecimal type issue. (sonic-net#20054)
issue seen on 2700 https://dev.azure.com/mssonic/internal/_build/results?buildId=913225&view=logs&j=76acabad-01e9-5c52-6fe6-d396d63e85d2&t=55864d99-7fe9-5504-0078-bfbb010fc228&l=4109 2025-08-01T12:37:49.4730701Z 2025-08-01 12:37:43 : -------------------------------------------------- 2025-08-01T12:37:49.4731666Z 2025-08-01 12:37:43 : Fails: 2025-08-01T12:37:49.4732373Z 2025-08-01 12:37:43 : -------------------------------------------------- 2025-08-01T12:37:49.4733177Z 2025-08-01 12:37:43 : FAILED:dut:Traceback (most recent call last): 2025-08-01T12:37:49.4733944Z File "/root/ptftests/py3/advanced-reboot.py", line 1445, in runTest 2025-08-01T12:37:49.4734679Z self.handle_advanced_reboot_health_check() 2025-08-01T12:37:49.4735464Z File "/root/ptftests/py3/advanced-reboot.py", line 1167, in handle_advanced_reboot_health_check 2025-08-01T12:37:49.4736205Z self.examine_flow() 2025-08-01T12:37:49.4736865Z File "/root/ptftests/py3/advanced-reboot.py", line 2138, in examine_flow 2025-08-01T12:37:49.4737694Z self.disruption_stop = datetime.datetime.fromtimestamp( 2025-08-01T12:37:49.4738332Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-08-01T12:37:49.4739025Z TypeError: 'EDecimal' object cannot be interpreted as an integer 2025-08-01T12:37:49.4739366Z 2025-08-01T12:37:49.4740035Z 2025-08-01 12:37:43 : ================================================== 2025-08-01T12:37:49.4740823Z 2025-08-01 12:37:43 : Disabling arp_responder 2025-08-01T12:37:49.4741111Z
1 parent 7904f04 commit 7eedc3e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ansible/roles/test/files/ptftests/py3/advanced-reboot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,9 +2134,9 @@ def examine_flow(self, filename=None):
21342134
self.log("")
21352135
if not self.disruption_start:
21362136
self.disruption_start = datetime.datetime.fromtimestamp(
2137-
prev_time)
2137+
float(prev_time))
21382138
self.disruption_stop = datetime.datetime.fromtimestamp(
2139-
received_time)
2139+
float(received_time))
21402140
prev_payload = received_payload
21412141
prev_time = received_time
21422142
self.log(

0 commit comments

Comments
 (0)