Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project auth-course: There are test failures.
date
Aug 26, 2022
slug
Failed-to-execute-goal-org-apache-maven-plugins-maven-surefire-plugin-2-22-2-test-default-test-on-project-auth-course-There-are-test-failures
status
Published
tags
Bugfix
AWS
CI/CD
Docker
Jenkins
summary
type
Post
Background
I launched an
AWS EC2 instance using Amazon Linux 2 AMI, and I launched Jenkins in a Docker container on this instance to build my project.Problem
However,
Jenkins failed building the project, and the Console Output logged the error below:What’s wrong
That was because I was running the
EC2 instance using t2.micro instance type, so the build failed because of OUT OF MEMORY.Solution
We can add swap to the
EC2 instance.By default we don’t have swap space. To confirm this:
Just add some. Try with 1 GB for begin.
Check again: