Skip to content

Commit fb66d5d

Browse files
committed
Settings beginning with -D, -d or -p should appear before settings beginning with -- when starting a node
1 parent 04fbfeb commit fb66d5d

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/Tests/Framework/Integration/Process/ElasticsearchNode.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,20 @@ public IObservable<ElasticsearchMessage> Start(string[] additionalSettings = nul
175175
}
176176
}
177177
}
178-
var settings = new string[]
179-
{
180-
$"-Des.cluster.name={this.ClusterName}",
181-
$"-Des.node.name={this.NodeName}",
182-
$"-Des.path.repo={this.RepositoryPath}",
183-
$"-Des.script.inline=on",
184-
$"-Des.script.indexed=on",
185-
$"--node.testingcluster true"
186-
}.Concat(additionalSettings ?? Enumerable.Empty<string>());
178+
var settings = new string[]
179+
{
180+
$"-Des.cluster.name={this.ClusterName}",
181+
$"-Des.node.name={this.NodeName}",
182+
$"-Des.path.repo={this.RepositoryPath}",
183+
$"-Des.script.inline=on",
184+
$"-Des.script.indexed=on",
185+
$"--node.testingcluster true"
186+
}
187+
.Concat(additionalSettings ?? Enumerable.Empty<string>())
188+
.OrderByDescending(s =>
189+
s.StartsWith("-d", StringComparison.OrdinalIgnoreCase) ||
190+
s.StartsWith("-p", StringComparison.OrdinalIgnoreCase))
191+
.ThenBy(s => s);
187192

188193
this._process = new ObservableProcess(this.Binary, settings.ToArray());
189194

0 commit comments

Comments
 (0)