File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
ManagedElasticsearch/Clusters Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ public static class EphemeralClusterExtensions
1313 public static ConnectionSettings CreateConnectionSettings < TConfig > ( this IEphemeralCluster < TConfig > cluster )
1414 where TConfig : EphemeralClusterConfiguration
1515 {
16- return new TestConnectionSettings ( ) ;
16+ var clusterNodes = cluster . NodesUris ( TestConnectionSettings . LocalOrProxyHost ) ;
17+ //we ignore the uri's that TestConnection provides and seed with the nodes the cluster dictates.
18+ return new TestConnectionSettings ( uris => new StaticConnectionPool ( clusterNodes ) ) ;
1719 }
1820
1921 public static IElasticClient GetOrAddClient < TConfig > (
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ protected virtual ConnectionSettings Authenticate(ConnectionSettings s) => s
4141 protected virtual ConnectionSettings ConnectionSettings ( ConnectionSettings s ) => s
4242 . ServerCertificateValidationCallback ( CertificateValidations . AllowAll ) ;
4343
44- public virtual IElasticClient Client => this . GetOrAddClient ( s=> this . Authenticate ( this . ConnectionSettings ( ConnectionSettingsExtensions . ApplyDomainSettings ( s ) ) ) ) ;
44+ public virtual IElasticClient Client => this . GetOrAddClient ( s=> this . Authenticate ( this . ConnectionSettings ( s . ApplyDomainSettings ( ) ) ) ) ;
4545
4646 protected override void SeedCluster ( ) => new DefaultSeeder ( this . Client ) . SeedNode ( ) ;
4747 }
You can’t perform that action at this time.
0 commit comments