testUsingContext('throws toolExit if gradle fails while downloading',()async{
testUsingContext('retries if gradle fails while downloading',()async{
constStringerrorMessage='''
Exception in thread "main" java.io.FileNotFoundException: https://downloads.gradle.org/distributions/gradle-4.1.1-all.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
...
...
@@ -59,13 +59,13 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
expect(testLogger.errorText,
contains(
'Gradle threw an error while trying to update itself. '
'Retrying the update...'
'Gradle threw an error while downloading artifacts from the network. '
'Retrying to download...'
)
);
});
testUsingContext('throw toolExit if gradle fails downloading with proxy error',()async{
testUsingContext('retries if gradle fails downloading with proxy error',()async{
constStringerrorMessage='''
Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2124)
...
...
@@ -87,13 +87,13 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
expect(testLogger.errorText,
contains(
'Gradle threw an error while trying to update itself. '
'Retrying the update...'
'Gradle threw an error while downloading artifacts from the network. '
'Retrying to download...'
)
);
});
testUsingContext('throws toolExit if gradle times out waiting for exclusive access to zip',()async{
testUsingContext('retries if gradle times out waiting for exclusive access to zip',()async{
constStringerrorMessage='''
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: /User/documents/gradle-5.6.2-all.zip
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61)
...
...
@@ -106,13 +106,13 @@ Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached
expect(testLogger.errorText,
contains(
'Gradle threw an error while trying to update itself. '
'Retrying the update...'
'Gradle threw an error while downloading artifacts from the network. '
'Retrying to download...'
)
);
});
testUsingContext('throws toolExit if remote host closes connection',()async{
testUsingContext('retries if remote host closes connection',()async{