8
8
import java .net .URI ;
9
9
import java .util .HashMap ;
10
10
import java .util .Map ;
11
- import java .util .concurrent .CompletableFuture ;
12
- import java .util .concurrent .TimeUnit ;
13
- import java .util .concurrent .TimeoutException ;
14
11
15
12
import org .hibernate .HibernateException ;
16
13
import org .hibernate .reactive .pool .impl .DefaultSqlClientPool ;
@@ -37,41 +34,6 @@ public class JdbcUrlParserTest {
37
34
38
35
private static final String DEFAULT_DB = "hreactDB" ;
39
36
40
- @ Test
41
- public void test () throws Exception {
42
- CompletableFuture <Void > c1 = CompletableFuture
43
- .runAsync ( () -> {
44
- try {
45
- System .out .println ( "Start CF 1" );
46
- Thread .sleep ( 2000 );
47
- System .out .println ( 1 );
48
- } catch (InterruptedException e ) {
49
- throw new RuntimeException (e );
50
- }
51
- });
52
-
53
- CompletableFuture <Void > c2 = CompletableFuture
54
- .runAsync (() -> {
55
- try {
56
- System .out .println ( "Start CF 2" );
57
- Thread .sleep ( 100 );
58
- System .out .println ( 2 );
59
- } catch (InterruptedException e ) {
60
- throw new RuntimeException (e );
61
- }
62
- });
63
-
64
- long start = System .currentTimeMillis ();
65
- try {
66
- c1 .get ( 50 , TimeUnit .MILLISECONDS );
67
- }
68
- catch (TimeoutException e ) {
69
- System .out .println ( "CF interrupted after " + ( System .currentTimeMillis () - start ) + "ms" );
70
- c1 .cancel ( true );
71
- }
72
- c2 .get ();
73
- }
74
-
75
37
@ Test
76
38
public void exceptionWhenNull () {
77
39
assertThatExceptionOfType ( HibernateException .class )
0 commit comments