Skip to content

Commit 9bb8f89

Browse files
committed
Adding test in attempt to reproduce #1079
1 parent 2d3c079 commit 9bb8f89

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
<Compile Include="Core\AsyncTests.cs" />
183183
<Compile Include="Mapping\MappingVisitorTests.cs" />
184184
<Compile Include="Mapping\GetMultipleMappingTests.cs" />
185+
<Compile Include="Reproduce\Reproduce1079Tests.cs" />
185186
<Compile Include="Reproduce\Reproduce769Tests.cs" />
186187
<Compile Include="Reproduce\Reproduce945Tests.cs" />
187188
<Compile Include="Reproduce\Reproduce953Tests.cs" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using FluentAssertions;
2+
using Nest.Tests.MockData.Domain;
3+
using NUnit.Framework;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
10+
namespace Nest.Tests.Integration.Reproduce
11+
{
12+
[TestFixture]
13+
public class Reproduce1079Tests : IntegrationTests
14+
{
15+
[Test]
16+
public void InnerSumAggregationTest()
17+
{
18+
var response = this.Client.Search<ElasticsearchProject>(s => s
19+
.Aggregations(a => a
20+
.Histogram("hist", h => h
21+
.Field(p => p.StartedOn)
22+
.Interval(3000)
23+
.Aggregations(aa => aa
24+
.Sum("sizes", sa => sa
25+
.Field(p => p.LongValue)
26+
)
27+
)
28+
)
29+
)
30+
);
31+
32+
var hist = response.Aggs.Histogram("hist");
33+
foreach (var interval in hist.Items)
34+
{
35+
var sizes = interval.Sum("sizes");
36+
}
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)