File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/test/java/org/apache/commons/pool3/impl Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1717package org .apache .commons .pool3 .impl ;
1818
1919import static org .junit .jupiter .api .Assertions .assertEquals ;
20+ import static org .junit .jupiter .api .Assertions .assertFalse ;
2021
2122import java .time .Duration ;
2223
@@ -30,19 +31,21 @@ public class TestEvictionConfig {
3031 @ Test
3132 public void testConstructor1s () {
3233 final EvictionConfig config = new EvictionConfig (Duration .ofMillis (1 ), Duration .ofMillis (1 ), 1 );
33-
3434 assertEquals (1 , config .getIdleEvictDuration ().toMillis ());
3535 assertEquals (1 , config .getIdleSoftEvictDuration ().toMillis ());
3636 assertEquals (1 , config .getMinIdle ());
37+ // toString() should never throw
38+ assertFalse (config .toString ().isEmpty ());
3739 }
3840
3941 @ Test
4042 public void testConstructorZerosDurations () {
4143 final EvictionConfig config = new EvictionConfig (Duration .ZERO , Duration .ZERO , 0 );
42-
4344 assertEquals (Long .MAX_VALUE , config .getIdleEvictDuration ().toMillis ());
4445 assertEquals (Long .MAX_VALUE , config .getIdleSoftEvictDuration ().toMillis ());
4546 assertEquals (0 , config .getMinIdle ());
47+ // toString() should never throw
48+ assertFalse (config .toString ().isEmpty ());
4649 }
4750
4851}
You can’t perform that action at this time.
0 commit comments