OutOfMemoryError error occurs when adding vintage junit

I translate tests to junit. to support tests on junit 4, I added a vintage dependency. ``

<dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
  </dependency>
  <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.7.0-M1</version>
      <scope>test</scope>
  </dependency>
  <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-runner</artifactId>
      <version>1.7.0-M1</version>
      <scope>test</scope>
  </dependency>

Error occurs when building on Travis

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-6"

I added memory MAVEN_OPTS='-Xmx1300m' . the build goes through but still an error appears at the end

   [ERROR] Java heap space -> [Help 1]
   [ERROR] 
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR] 
   [ERROR] For more information about the errors and possible solutions, please read the 
   following articles:
   [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError 

really confused, a little frustrated, any help would be appreciated

You need to upgrade the maven-surefire-plugin. This bug SUREFIRE-1382 has been fixed in 2.20.1. This is easily fixable.

Imprint