Set the maxParallelForks for both test and integrationTest
maxParallelForks
test
integrationTest
You can find more about it here.
Or if you want to run test and integrationTest simultaneously set
org.gradle.parallel=true
in your gradle.properties file. docs
gradle.properties