Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for service start when setting up test VMs; collect VM logs when… #2830

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests_e2e/orchestrator/lib/agent_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@ def _execute(self, environment: Environment, variables: Dict[str, Any]):
# its type is List[AgentTestSuite].
# E1133: Non-iterable value self.context.test_suites is used in an iterating context (not-an-iterable)
install_test_agent = all([suite.install_test_agent for suite in self.context.test_suites]) # pylint: disable=E1133
self._setup_node(install_test_agent)
try:
self._setup_node(install_test_agent)
except:
test_suite_success = False
raise

for suite in self.context.test_suites: # pylint: disable=E1133
log.info("Executing test suite %s", suite.name)
Expand Down
17 changes: 16 additions & 1 deletion tests_e2e/orchestrator/scripts/install-agent
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,22 @@ echo "Agent Path: $waagent"
echo "Agent Version:"
$python "$waagent" --version
echo "Service Status:"
service-status $service_name

# Sometimes the service can take a while to start; give it a few minutes,
started=false
for i in {1..6}
do
if service-status $service_name; then
started=true
break
fi
echo "Waiting for service to start..."
sleep 30
done
if [ $started == false ]; then
echo "Service failed to start."
exit 1
fi

#
# Install the package
Expand Down