diff --git a/autotest.sh b/autotest.sh
index 960f03ec1f65b6bd47c3aa3253045bfabbe6da23..e9327c8f83edaa691ea3e475cba52bd10ff08513 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -167,8 +167,8 @@ function execute_tests {
 
 		echo "Waiting for Oracle initialization ... "
 
-		# grep exits on the first match and then the script continues
-		docker logs -f "$DOCKER_CONTAINER_ID" 2>&1 | grep -q "Grant succeeded."
+		# grep exits on the first match and then the script continues - times out after 2 minutes
+		timeout 120 docker logs -f "$DOCKER_CONTAINER_ID" 2>&1 | grep -q "Grant succeeded."
 
 		DATABASEUSER=autotest
 		DATABASENAME='XE'