File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
ServiceControl.Audit.Persistence.RavenDB
ServiceControl.Persistence.RavenDB Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class MemoryInformationRetriever(DatabaseConfiguration databaseConfiguration)
1313 // string when running in external mode. However, the tricky part is that when tests are run they
1414 // behave like if it was external mode. If the connection string contain always only the server
1515 // URL, this code is safe, otherwise it need to be adjusted to extract the server URL.
16- readonly HttpClient client = new ( ) { BaseAddress = new Uri ( databaseConfiguration . ServerConfiguration . ServerUrl ?? databaseConfiguration . ServerConfiguration . ConnectionString ) } ;
16+ readonly HttpClient client = new ( ) { BaseAddress = new Uri ( databaseConfiguration . ServerConfiguration . ConnectionString ?? databaseConfiguration . ServerConfiguration . ServerUrl ) } ;
1717
1818 record ResponseDto
1919 {
Original file line number Diff line number Diff line change @@ -9,10 +9,11 @@ namespace ServiceControl.Persistence.RavenDB;
99class MemoryInformationRetriever ( RavenPersisterSettings persisterSettings )
1010{
1111 // What does a connection string look like? Is it only a URI or could it contain other stuff?
12- // The primary instance has only the concept of a connection string (vs the Audit instance having
13- // both a ServiceUrl and a ConnectionString). If the connection string contain always only the
14- // server URL, this code is safe, otherwise it need to be adjusted to extract the server URL.
15- readonly HttpClient client = new ( ) { BaseAddress = new Uri ( persisterSettings . ServerUrl ?? persisterSettings . ConnectionString ) } ;
12+ // The ?? operator is needed because ServerUrl is populated when running embedded and connection
13+ // string when running in external mode. However, the tricky part is that when tests are run they
14+ // behave like if it was external mode. If the connection string contain always only the server
15+ // URL, this code is safe, otherwise it need to be adjusted to extract the server URL.
16+ readonly HttpClient client = new ( ) { BaseAddress = new Uri ( persisterSettings . ConnectionString ?? persisterSettings . ServerUrl ) } ;
1617
1718 record ResponseDto
1819 {
You can’t perform that action at this time.
0 commit comments