@@ -95,7 +95,7 @@ private void assertCredentials(Settings singleRepositorySettings, Settings setti
95
95
}
96
96
97
97
public void testAWSDefaultConfiguration () {
98
- launchAWSConfigurationTest (Settings .EMPTY , Settings . EMPTY , Protocol .HTTPS , null , -1 , null , null , 3 ,
98
+ launchAWSConfigurationTest (Settings .EMPTY , Protocol .HTTPS , null , -1 , null , null , 3 ,
99
99
ClientConfiguration .DEFAULT_THROTTLE_RETRIES , ClientConfiguration .DEFAULT_SOCKET_TIMEOUT );
100
100
}
101
101
@@ -110,38 +110,37 @@ public void testAWSConfigurationWithAwsSettings() {
110
110
.put ("s3.client.default.proxy.port" , 8080 )
111
111
.put ("s3.client.default.read_timeout" , "10s" )
112
112
.build ();
113
- launchAWSConfigurationTest (settings , Settings . EMPTY , Protocol .HTTP , "aws_proxy_host" , 8080 , "aws_proxy_username" ,
113
+ launchAWSConfigurationTest (settings , Protocol .HTTP , "aws_proxy_host" , 8080 , "aws_proxy_username" ,
114
114
"aws_proxy_password" , 3 , ClientConfiguration .DEFAULT_THROTTLE_RETRIES , 10000 );
115
115
}
116
116
117
117
public void testRepositoryMaxRetries () {
118
118
Settings settings = Settings .builder ()
119
119
.put ("s3.client.default.max_retries" , 5 )
120
120
.build ();
121
- launchAWSConfigurationTest (settings , Settings . EMPTY , Protocol .HTTPS , null , -1 , null ,
121
+ launchAWSConfigurationTest (settings , Protocol .HTTPS , null , -1 , null ,
122
122
null , 5 , ClientConfiguration .DEFAULT_THROTTLE_RETRIES , 50000 );
123
123
}
124
124
125
125
public void testRepositoryThrottleRetries () {
126
126
final boolean throttling = randomBoolean ();
127
127
128
128
Settings settings = Settings .builder ().put ("s3.client.default.use_throttle_retries" , throttling ).build ();
129
- launchAWSConfigurationTest (settings , Settings . EMPTY , Protocol .HTTPS , null , -1 , null , null , 3 , throttling , 50000 );
129
+ launchAWSConfigurationTest (settings , Protocol .HTTPS , null , -1 , null , null , 3 , throttling , 50000 );
130
130
}
131
131
132
132
private void launchAWSConfigurationTest (Settings settings ,
133
- Settings singleRepositorySettings ,
134
- Protocol expectedProtocol ,
135
- String expectedProxyHost ,
136
- int expectedProxyPort ,
137
- String expectedProxyUsername ,
138
- String expectedProxyPassword ,
139
- Integer expectedMaxRetries ,
140
- boolean expectedUseThrottleRetries ,
141
- int expectedReadTimeout ) {
133
+ Protocol expectedProtocol ,
134
+ String expectedProxyHost ,
135
+ int expectedProxyPort ,
136
+ String expectedProxyUsername ,
137
+ String expectedProxyPassword ,
138
+ Integer expectedMaxRetries ,
139
+ boolean expectedUseThrottleRetries ,
140
+ int expectedReadTimeout ) {
142
141
143
142
S3ClientSettings clientSettings = S3ClientSettings .getClientSettings (settings , "default" );
144
- ClientConfiguration configuration = InternalAwsS3Service .buildConfiguration (clientSettings , singleRepositorySettings );
143
+ ClientConfiguration configuration = InternalAwsS3Service .buildConfiguration (clientSettings );
145
144
146
145
assertThat (configuration .getResponseMetadataCacheSize (), is (0 ));
147
146
assertThat (configuration .getProtocol (), is (expectedProtocol ));
0 commit comments