From 35e3fe98688b7b97ba8d708f163dff92b12905e3 Mon Sep 17 00:00:00 2001 From: Shuyang Xin Date: Wed, 8 Jan 2025 17:07:31 +0800 Subject: [PATCH] Fix Windows Conformance failure by updating time synchronization script fixes #6892 Signed-off-by: Shuyang Xin --- ci/jenkins/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/jenkins/test.sh b/ci/jenkins/test.sh index 690196b7270..d9bd78ecb43 100755 --- a/ci/jenkins/test.sh +++ b/ci/jenkins/test.sh @@ -378,6 +378,10 @@ function revert_snapshot_windows { exit 1 fi IP=${winVMIPs#*,} + # Since Windows cannot perform time synchronization when there is a significant time gap, + # we need to adjust the time based on the Linux time after reverting the snapshot to prevent time synchronization failures on Windows. + LinuxDate=$(date -d "$(date)" "+%Y-%m-%d %H:%M:%S") + ssh -o StrictHostKeyChecking=no -n Administrator@${IP} 'powershell.exe \"Set-Date -Date '$LinuxDate'\"' # Windows VM is reverted to an old snapshot so computer date needs updating. for i in `seq 24`; do sleep 5