File tree 1 file changed +9
-13
lines changed
ManagedCode.Database.Tests/TestContainers
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,12 @@ public async Task InitializeAsync()
94
94
containerId = containerListResponse . ID ;
95
95
}
96
96
}
97
-
97
+
98
+ var httpMessageHandler = new HttpClientHandler ( )
99
+ {
100
+ ServerCertificateCustomValidationCallback = HttpClientHandler . DangerousAcceptAnyServerCertificateValidator
101
+ } ;
102
+
98
103
_database = new CosmosDatabase ( new CosmosOptions
99
104
{
100
105
ConnectionString =
@@ -104,21 +109,12 @@ public async Task InitializeAsync()
104
109
AllowTableCreation = true ,
105
110
CosmosClientOptions = new CosmosClientOptions ( )
106
111
{
107
- HttpClientFactory = ( ) =>
108
- {
109
- HttpMessageHandler httpMessageHandler = new HttpClientHandler ( )
110
- {
111
- ServerCertificateCustomValidationCallback =
112
- HttpClientHandler . DangerousAcceptAnyServerCertificateValidator
113
- } ;
114
-
115
- return new HttpClient ( httpMessageHandler ) ;
116
- } ,
117
- ConnectionMode = ConnectionMode . Gateway
112
+ HttpClientFactory = ( ) => new HttpClient ( httpMessageHandler ) ,
113
+ ConnectionMode = ConnectionMode . Gateway ,
114
+ RequestTimeout = TimeSpan . FromMinutes ( 3 )
118
115
} ,
119
116
} ) ;
120
117
121
-
122
118
await _database . InitializeAsync ( ) ;
123
119
}
124
120
You can’t perform that action at this time.
0 commit comments