File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
ManagedCode.Database.Tests/TestContainers Expand file tree Collapse file tree 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()
9494 containerId = containerListResponse . ID ;
9595 }
9696 }
97-
97+
98+ var httpMessageHandler = new HttpClientHandler ( )
99+ {
100+ ServerCertificateCustomValidationCallback = HttpClientHandler . DangerousAcceptAnyServerCertificateValidator
101+ } ;
102+
98103 _database = new CosmosDatabase ( new CosmosOptions
99104 {
100105 ConnectionString =
@@ -104,21 +109,12 @@ public async Task InitializeAsync()
104109 AllowTableCreation = true ,
105110 CosmosClientOptions = new CosmosClientOptions ( )
106111 {
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 )
118115 } ,
119116 } ) ;
120117
121-
122118 await _database . InitializeAsync ( ) ;
123119 }
124120
You can’t perform that action at this time.
0 commit comments