Gradle test task doesn't use configuration values

Hi

I have a project where I configured test task:

test {

jvmArgs ‘-Djava.net.preferIPv4Stack=true’

executable ‘C:/Program Files/Java/jdk1.6.0_43/bin/javaw.exe’ }

When I run test task I suppose Gradle will use Java 6 to run the tests(and also use IPv4 protocol).

gradle -Djava.net.preferIPv4Stack=true test

However I see in my firewall that Gradle opens(or tries to open) 6 TCP connections. Five of them are TCPv4 opened by javaw.exe. And one is java.exe(which is Java 7) and TCPv6.

TCPv6 somehow doesn’t work with Gradle so overall tests failed.

How does it fail? Do you get a stacktrace? An error message?

Yes, this is continuation of http://forums.gradle.org/gradle/topics/gradle_build_failure_with_java_7

I am trying to configure Gradle so that it uses IPv4 for all connections while testing. I almost did it. Five connections use IPv4. However one connection still uses IPv6. Although I setup everywhere -Djava.net.preferIPv4Stack=true

Is it possible to configure that? Or run tests by one gradle worker so that no connections are needed.

I’m going to respond on the other thread. There’s no reason to use two forum threads.