Skip to content

Commit bb45b8f

Browse files
committed
ConnectionReuse integration test unnecessarilty slow (moved to async searches and removed wrap in Parallel.For)
1 parent b8e092c commit bb45b8f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Tests/Reproduce/ConnectionReuseAndBalancing.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ [I] public async Task IndexAndSearchABunch()
5454
this.AssertHttpStats(nodeStats);
5555
for (var i = 0; i < 10; i++)
5656
{
57-
Parallel.For(0, 1000, c => client.Search<Project>(s => s));
57+
var taskList = new Task[1000];
58+
for (var t=0;t<1000;t++)
59+
{
60+
taskList[t] = client.SearchAsync<Project>();
61+
}
62+
//Parallel.For(0, 1000, c => client.Search<Project>(s => s));
63+
Task.WaitAll(taskList);
5864

5965
nodeStats = await client.NodesStatsAsync(statsRequest);
6066
this.AssertHttpStats(nodeStats);

0 commit comments

Comments
 (0)