Skip to content

Commit 8826b1f

Browse files
committed
Revert "Fixed failing test cases"
This reverts commit ce28574.
1 parent ca75883 commit 8826b1f

11 files changed

+49
-132
lines changed

document-store/src/integrationTest/java/org/hypertrace/core/documentstore/DocStoreQueryV1Test.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
import com.typesafe.config.Config;
6969
import com.typesafe.config.ConfigFactory;
7070
import java.io.IOException;
71-
import java.util.ArrayList;
7271
import java.util.HashMap;
7372
import java.util.HashSet;
7473
import java.util.Iterator;
@@ -3277,7 +3276,7 @@ void testFlatPostgresCollectionCount(String dataStoreName) {
32773276

32783277
// Test count method - all documents
32793278
long totalCount = flatCollection.count(Query.builder().build());
3280-
assertEquals(14, totalCount);
3279+
assertEquals(10, totalCount);
32813280

32823281
// Test count with filter - soap documents only
32833282
Query soapQuery =
@@ -3570,8 +3569,8 @@ void testFlatVsNestedCollectionConsistency(String dataStoreName) throws IOExcept
35703569
Query countAllQuery = Query.builder().build();
35713570
long nestedCount = nestedCollection.count(countAllQuery);
35723571
long flatCount = flatCollection.count(countAllQuery);
3573-
assertEquals(14, nestedCount, "Nested collection should have 14 documents");
3574-
assertEquals(14, flatCount, "Flat collection should have 14 documents");
3572+
assertEquals(8, nestedCount, "Nested collection should have 8 documents");
3573+
assertEquals(10, flatCount, "Flat collection should have 10 documents");
35753574

35763575
// Test 2: Filter by top-level field - item
35773576
Query itemFilterQuery =
@@ -3598,16 +3597,16 @@ void testFlatVsNestedCollectionConsistency(String dataStoreName) throws IOExcept
35983597

35993598
long nestedPriceCount = nestedCollection.count(priceFilterQuery);
36003599
long flatPriceCount = flatCollection.count(priceFilterQuery);
3601-
assertEquals(4, nestedPriceCount, "Nested should have 4 docs with price > 10");
3602-
assertEquals(4, flatPriceCount, "Flat should have 4 docs with price > 10");
3600+
assertEquals(2, nestedPriceCount, "Nested should have 2 docs with price > 10");
3601+
assertEquals(3, flatPriceCount, "Flat should have 3 docs with price > 10");
36033602

36043603
// Test 4: Compare actual document content for same filter
36053604
CloseableIterator<Document> nestedIterator = nestedCollection.find(itemFilterQuery);
36063605
CloseableIterator<Document> flatIterator = flatCollection.find(itemFilterQuery);
36073606

36083607
// Collect documents from both collections
3609-
List<String> nestedDocs = new ArrayList<>();
3610-
List<String> flatDocs = new ArrayList<>();
3608+
java.util.List<String> nestedDocs = new java.util.ArrayList<>();
3609+
java.util.List<String> flatDocs = new java.util.ArrayList<>();
36113610

36123611
while (nestedIterator.hasNext()) {
36133612
nestedDocs.add(nestedIterator.next().toJson());
@@ -3716,7 +3715,7 @@ void testFlatPostgresCollectionUnnestTags(String dataStoreName) throws IOExcepti
37163715

37173716
Iterator<Document> resultIterator = flatCollection.aggregate(unnestQuery);
37183717
assertDocsAndSizeEqualWithoutOrder(
3719-
dataStoreName, resultIterator, "query/flat_unnest_tags_response.json", 19);
3718+
dataStoreName, resultIterator, "query/flat_unnest_tags_response.json", 17);
37203719
}
37213720

37223721
/**

document-store/src/integrationTest/resources/query/collection_data.json

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -183,47 +183,5 @@
183183
"price": 10,
184184
"quantity": 5,
185185
"date": "2016-02-06T20:20:13Z"
186-
},
187-
{
188-
"_id": 9,
189-
"item": "Bottle",
190-
"price": 15,
191-
"quantity": 3,
192-
"date": "2016-03-01T10:00:00Z"
193-
},
194-
{
195-
"_id": 10,
196-
"item": "Cup",
197-
"price": 8,
198-
"quantity": 2,
199-
"date": "2016-04-01T10:00:00Z"
200-
},
201-
{
202-
"_id": 11,
203-
"item": "Pencil",
204-
"price": 2,
205-
"quantity": 50,
206-
"date": "2016-05-01T10:00:00Z"
207-
},
208-
{
209-
"_id": 12,
210-
"item": "Eraser",
211-
"price": 1,
212-
"quantity": 100,
213-
"date": "2016-06-01T10:00:00Z"
214-
},
215-
{
216-
"_id": 13,
217-
"item": "Notebook",
218-
"price": 25,
219-
"quantity": 10,
220-
"date": "2016-07-01T10:00:00Z"
221-
},
222-
{
223-
"_id": 14,
224-
"item": "Pen",
225-
"price": 5,
226-
"quantity": 20,
227-
"date": "2016-08-01T10:00:00Z"
228186
}
229187
]

document-store/src/integrationTest/resources/query/flat_integer_array_filter_response.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
{
33
"item": "Mirror",
44
"price": 20
5-
},
6-
{
7-
"item": "Pen",
8-
"price": 5
95
}
10-
]
6+
]

document-store/src/integrationTest/resources/query/flat_jsonb_brand_selection_response.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,5 @@
2020
{},
2121
{},
2222
{},
23-
{},
24-
{},
25-
{},
26-
{},
2723
{}
28-
]
24+
]

document-store/src/integrationTest/resources/query/flat_jsonb_city_selection_response.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
}
99
}
1010
},
11-
{},
11+
{
12+
},
1213
{
1314
"props": {
1415
"seller": {
@@ -18,7 +19,8 @@
1819
}
1920
}
2021
},
21-
{},
22+
{
23+
},
2224
{
2325
"props": {
2426
"seller": {
@@ -28,7 +30,8 @@
2830
}
2931
}
3032
},
31-
{},
33+
{
34+
},
3235
{
3336
"props": {
3437
"seller": {
@@ -40,9 +43,5 @@
4043
},
4144
{},
4245
{},
43-
{},
44-
{},
45-
{},
46-
{},
4746
{}
48-
]
47+
]

document-store/src/integrationTest/resources/query/flat_jsonb_colors_selection_response.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
]
88
}
99
},
10-
{},
1110
{
1211
"props": {
1312
"colors": [
1413
"Black"
1514
]
1615
}
1716
},
18-
{},
1917
{
2018
"props": {
2119
"colors": [
@@ -24,7 +22,6 @@
2422
]
2523
}
2624
},
27-
{},
2825
{
2926
"props": {
3027
"colors": []
@@ -35,6 +32,5 @@
3532
{},
3633
{},
3734
{},
38-
{},
3935
{}
40-
]
36+
]

document-store/src/integrationTest/resources/query/flat_jsonb_group_by_brand_test_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"count": 11
3+
"count": 7
44
},
55
{
66
"props": {
Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
11
[
2-
{
3-
"categoryTags": "PersonalCare",
4-
"count": 2
5-
},
6-
{
7-
"categoryTags": "HomeDecor",
8-
"count": 1
9-
},
10-
{
11-
"categoryTags": "Hygiene",
12-
"count": 3
13-
},
14-
{
15-
"categoryTags": "Stationery",
16-
"count": 1
17-
},
18-
{
19-
"categoryTags": "HairCare",
20-
"count": 2
21-
},
22-
{
23-
"categoryTags": "Grooming",
24-
"count": 2
25-
}
26-
]
2+
{"categoryTags": "Hygiene", "count": 3},
3+
{"categoryTags": "PersonalCare", "count": 2},
4+
{"categoryTags": "HairCare", "count": 2},
5+
{"categoryTags": "HomeDecor", "count": 1},
6+
{"categoryTags": "Grooming", "count": 2}
7+
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
22
{
3-
"count": 28
3+
"count": 25
44
}
55
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
22
{
3-
"count": 32
3+
"count": 27
44
}
55
]

0 commit comments

Comments
 (0)