Skip to content

Commit f0a7d40

Browse files
committed
updated reindex test to include a refresh so they are guaranteed to succeed
1 parent cc4009a commit f0a7d40

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/Nest.Tests.Integration/Index/ReindexTests.cs

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public void ReindexMinimal()
2323
onError: (e) => Assert.Fail(e.Message),
2424
completed: () =>
2525
{
26+
var refresh = this._client.Refresh(new[] { toIndex, ElasticsearchConfiguration.DefaultIndex });
2627
var originalIndexCount = this._client.Count(new[] { ElasticsearchConfiguration.DefaultIndex }, q => q.MatchAll());
2728
var newIndexCount = this._client.Count(new[] { toIndex }, q => q.MatchAll());
2829
Assert.Greater(newIndexCount.Count, 0);
@@ -62,6 +63,7 @@ public void Reindex()
6263
onError: (e) => Assert.Fail(e.Message),
6364
completed: () =>
6465
{
66+
var refresh = this._client.Refresh(new[] { toIndex, ElasticsearchConfiguration.DefaultIndex });
6567
var originalIndexCount = this._client.Count(new[] { ElasticsearchConfiguration.DefaultIndex }, q=>q.MatchAll());
6668
var newIndexCount = this._client.Count(new[] { toIndex }, q=>q.MatchAll());
6769
Assert.Greater(newIndexCount.Count, 0);

src/Nest.sln

-13
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nest.Dsl.Factory", "Nest.Ds
4040
EndProject
4141
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nest.ProfilerHelper", "Nest.ProfilerHelper\Nest.ProfilerHelper.csproj", "{2727A374-9866-4A9D-9A40-6175334B5992}"
4242
EndProject
43-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{59540309-1B42-4064-AFB4-D31F346D15E6}"
44-
EndProject
4543
Global
4644
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4745
Debug|Any CPU = Debug|Any CPU
@@ -144,16 +142,6 @@ Global
144142
{2727A374-9866-4A9D-9A40-6175334B5992}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
145143
{2727A374-9866-4A9D-9A40-6175334B5992}.Release|Mixed Platforms.Build.0 = Release|Any CPU
146144
{2727A374-9866-4A9D-9A40-6175334B5992}.Release|x86.ActiveCfg = Release|Any CPU
147-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
148-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
149-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
150-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
151-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Debug|x86.ActiveCfg = Debug|Any CPU
152-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
153-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Release|Any CPU.Build.0 = Release|Any CPU
154-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
155-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
156-
{59540309-1B42-4064-AFB4-D31F346D15E6}.Release|x86.ActiveCfg = Release|Any CPU
157145
EndGlobalSection
158146
GlobalSection(SolutionProperties) = preSolution
159147
HideSolutionNode = FALSE
@@ -162,7 +150,6 @@ Global
162150
{E39CC264-A7B3-490D-84B2-D3016D86CD87} = {DDC38E1C-13BF-4C96-A3BF-60F14DFC5069}
163151
{B9FE4875-0171-40F7-A357-064A93BE09C6} = {DDC38E1C-13BF-4C96-A3BF-60F14DFC5069}
164152
{2727A374-9866-4A9D-9A40-6175334B5992} = {DDC38E1C-13BF-4C96-A3BF-60F14DFC5069}
165-
{59540309-1B42-4064-AFB4-D31F346D15E6} = {DDC38E1C-13BF-4C96-A3BF-60F14DFC5069}
166153
EndGlobalSection
167154
GlobalSection(Performance) = preSolution
168155
HasPerformanceSessions = true

0 commit comments

Comments
 (0)