File tree 1 file changed +11
-7
lines changed
src/test/java/org/springframework/data/r2dbc/testing
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -33,31 +33,35 @@ public class SqlServerTestSupport {
33
33
34
34
/**
35
35
* Returns a locally provided database at {@code sqlserver:@localhost:1433/master}.
36
- *
37
- * @return
38
36
*/
39
37
public static ExternalDatabase database () {
40
38
return local ();
41
39
}
42
40
43
41
/**
44
- * Returns a locally provided database at {@code postgres:@localhost:5432/postgres}.
45
- *
46
- * @return
42
+ * Returns a locally provided database at {@code sqlserver:@localhost:1433/master}.
47
43
*/
48
44
private static ExternalDatabase local () {
49
- return ProvidedDatabase .builder ().hostname ("localhost" ).port (1433 ).database ("master" ).username ("sa" )
50
- .password ("A_Str0ng_Required_Password" ).build ();
45
+
46
+ return ProvidedDatabase .builder () //
47
+ .hostname ("localhost" ) //
48
+ .port (1433 ) //
49
+ .database ("master" ) //
50
+ .username ("sa" ) //
51
+ .password ("A_Str0ng_Required_Password" ) //
52
+ .build ();
51
53
}
52
54
53
55
/**
54
56
* Creates a new {@link ConnectionFactory} configured from the {@link ExternalDatabase}..
55
57
*/
56
58
public static ConnectionFactory createConnectionFactory (ExternalDatabase database ) {
59
+
57
60
return new MssqlConnectionFactory (MssqlConnectionConfiguration .builder ().host (database .getHostname ()) //
58
61
.database (database .getDatabase ()) //
59
62
.username (database .getUsername ()) //
60
63
.password (database .getPassword ()) //
64
+ .port (database .getPort ()) //
61
65
.build ());
62
66
}
63
67
You can’t perform that action at this time.
0 commit comments