Skip to content

Commit 4c0888c

Browse files
authored
Wait before running apt command (#1132)
1 parent 2c98109 commit 4c0888c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

azure-pipelines-e2e-tests-template.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ stages:
3939
pwsh: true
4040
targetType: inline
4141
script: |
42+
$numRetry = 0
43+
$maxRetry = 60*10
44+
45+
while($numRetry -le $maxRetry)
46+
{
47+
sudo fuser -v /var/lib/dpkg/lock-frontend 2>&1
48+
49+
if ($LASTEXITCODE -ne 0) { Break }
50+
51+
sleep 1
52+
$numRetry++
53+
echo "Waited $numRetry s for release of dpkg locks"
54+
}
55+
4256
sudo apt update
4357
sudo apt -y install maven
4458
mvn -version
@@ -169,4 +183,4 @@ stages:
169183
env:
170184
HADOOP_HOME: $(Build.BinariesDirectory)$(PATH_SEPARATOR)hadoop
171185
SPARK_HOME: $(Build.BinariesDirectory)$(PATH_SEPARATOR)spark-${{ test.version }}-bin-hadoop2.7
172-
DOTNET_WORKER_DIR: $(CURRENT_DOTNET_WORKER_DIR)
186+
DOTNET_WORKER_DIR: $(CURRENT_DOTNET_WORKER_DIR)

0 commit comments

Comments
 (0)