@@ -72,41 +72,45 @@ public void test_SimpleDBConnectionPool_config_newversion(){
72
72
assertEquals (5 ,config .getMaximumPoolSize ());
73
73
}
74
74
@ Test
75
- public void test_SimpleDBConnectionPool_config_MinimumandPoolSize_error () {
76
- config .setMinimumPoolSize (-1 );
75
+ public void test_SimpleDBConnectionPool_config_MinimumandPoolSize_and_MaximumPoolSize_null () {
77
76
pool = new SimpleDBConnectionPool (config );
78
77
assertEquals (5 , config .getMinimumPoolSize ());
79
-
80
- config .setMinimumPoolSize (0 );
78
+ assertEquals (5 , config .getMaximumPoolSize ());
79
+ }
80
+ @ Test
81
+ public void test_SimpleDBConnectionPool_config_maxpoolsize_minpoolsize_realtion () {
82
+ config .setMaximumPoolSize (6 );
83
+ config .setMinimumPoolSize (-1 );
81
84
pool = new SimpleDBConnectionPool (config );
82
85
assertEquals (5 , config .getMinimumPoolSize ());
83
-
84
- config .setMinimumPoolSize (6 );
85
- pool = new SimpleDBConnectionPool (config );
86
- assertEquals (6 , config .getMinimumPoolSize ());
87
86
assertEquals (6 , config .getMaximumPoolSize ());
88
87
89
- }
90
- @ Test
91
- public void test_SimpleDBConnectionPool_config_MinimumandPoolSize_null () {
88
+ config .setMaximumPoolSize (-4 );
89
+ config .setMinimumPoolSize (-6 );
92
90
pool = new SimpleDBConnectionPool (config );
93
91
assertEquals (5 , config .getMinimumPoolSize ());
92
+ assertEquals (5 , config .getMaximumPoolSize ());
94
93
}
95
94
@ Test
96
- public void test_SimpleDBConnectionPool_config_MaximumPoolSize_error () {
97
- config .setMaximumPoolSize (0 );
95
+ public void test_SimpleDBConnectionPool_config_maxpoolsize_minpoolsize_realtion_error () {
96
+ config .setMaximumPoolSize (4 );
97
+ config .setMinimumPoolSize (6 );
98
98
pool = new SimpleDBConnectionPool (config );
99
- assertEquals (5 , config .getMaximumPoolSize ());
99
+ assertEquals (6 , config .getMaximumPoolSize ());
100
+ assertEquals (6 , config .getMaximumPoolSize ());
100
101
101
102
config .setMaximumPoolSize (-5 );
103
+ config .setMinimumPoolSize (6 );
102
104
pool = new SimpleDBConnectionPool (config );
103
- assertEquals (5 , config .getMaximumPoolSize ());
105
+ assertEquals (6 , config .getMaximumPoolSize ());
106
+ assertEquals (6 , config .getMaximumPoolSize ());
104
107
105
- }
106
- @ Test
107
- public void test_SimpleDBConnectionPool_config_MaximumPoolSize_null () {
108
+ config .setMaximumPoolSize (-4 );
109
+ config .setMinimumPoolSize (-2 );
108
110
pool = new SimpleDBConnectionPool (config );
109
111
assertEquals (5 , config .getMaximumPoolSize ());
112
+ assertEquals (5 , config .getMaximumPoolSize ());
113
+
110
114
}
111
115
@ Test
112
116
public void test_SimpleDBConnectionPool_config_InvalididleTimeout_error () {
0 commit comments