1
+ /*
2
+ * Copyright 2012-2021 the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
1
17
package org .springframework .boot .autoconfigure .cassandra ;
2
18
3
19
import com .datastax .oss .driver .api .core .config .OptionsMap ;
@@ -16,24 +32,19 @@ class CassandraPropertiesTest {
16
32
@ Test
17
33
void defaultValuesAreConsistent () {
18
34
CassandraProperties properties = new CassandraProperties ();
19
- OptionsMap optionsMap = OptionsMap .driverDefaults ();
20
-
35
+ OptionsMap driverDefaults = OptionsMap .driverDefaults ();
21
36
assertThat (properties .getConnection ().getConnectTimeout ())
22
- .isEqualTo (optionsMap .get (TypedDriverOption .CONNECTION_CONNECT_TIMEOUT ));
23
-
37
+ .isEqualTo (driverDefaults .get (TypedDriverOption .CONNECTION_CONNECT_TIMEOUT ));
24
38
assertThat (properties .getConnection ().getInitQueryTimeout ())
25
- .isEqualTo (optionsMap .get (TypedDriverOption .CONNECTION_INIT_QUERY_TIMEOUT ));
26
-
27
- assertThat (properties .getRequest ().getTimeout ()).isEqualTo (optionsMap .get (TypedDriverOption .REQUEST_TIMEOUT ));
28
-
39
+ .isEqualTo (driverDefaults .get (TypedDriverOption .CONNECTION_INIT_QUERY_TIMEOUT ));
40
+ assertThat (properties .getRequest ().getTimeout ())
41
+ .isEqualTo (driverDefaults .get (TypedDriverOption .REQUEST_TIMEOUT ));
29
42
assertThat (properties .getRequest ().getPageSize ())
30
- .isEqualTo (optionsMap .get (TypedDriverOption .REQUEST_PAGE_SIZE ));
31
-
43
+ .isEqualTo (driverDefaults .get (TypedDriverOption .REQUEST_PAGE_SIZE ));
32
44
assertThat (properties .getRequest ().getThrottler ().getType ().type ())
33
- .isEqualTo (optionsMap .get (TypedDriverOption .REQUEST_THROTTLER_CLASS ));
34
-
45
+ .isEqualTo (driverDefaults .get (TypedDriverOption .REQUEST_THROTTLER_CLASS ));
35
46
assertThat (properties .getPool ().getHeartbeatInterval ())
36
- .isEqualTo (optionsMap .get (TypedDriverOption .HEARTBEAT_INTERVAL ));
47
+ .isEqualTo (driverDefaults .get (TypedDriverOption .HEARTBEAT_INTERVAL ));
37
48
}
38
49
39
50
}
0 commit comments