@@ -37,6 +37,7 @@ public void cleanUpTest() {
37
37
cleanUp ();
38
38
}
39
39
40
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/ml-cpp/pulls/122" )
40
41
public void testTooManyPartitions () throws Exception {
41
42
Detector .Builder detector = new Detector .Builder ("count" , null );
42
43
detector .setPartitionFieldName ("user" );
@@ -77,11 +78,12 @@ public void testTooManyPartitions() throws Exception {
77
78
// Assert we haven't violated the limit too much
78
79
GetJobsStatsAction .Response .JobStats jobStats = getJobStats (job .getId ()).get (0 );
79
80
ModelSizeStats modelSizeStats = jobStats .getModelSizeStats ();
80
- assertThat (modelSizeStats .getModelBytes (), lessThan (35000000L ));
81
- assertThat (modelSizeStats .getModelBytes (), greaterThan (30000000L ));
81
+ assertThat (modelSizeStats .getModelBytes (), lessThan (31500000L ));
82
+ assertThat (modelSizeStats .getModelBytes (), greaterThan (24000000L ));
82
83
assertThat (modelSizeStats .getMemoryStatus (), equalTo (ModelSizeStats .MemoryStatus .HARD_LIMIT ));
83
84
}
84
85
86
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/ml-cpp/pulls/122" )
85
87
public void testTooManyByFields () throws Exception {
86
88
Detector .Builder detector = new Detector .Builder ("count" , null );
87
89
detector .setByFieldName ("user" );
@@ -122,11 +124,12 @@ public void testTooManyByFields() throws Exception {
122
124
// Assert we haven't violated the limit too much
123
125
GetJobsStatsAction .Response .JobStats jobStats = getJobStats (job .getId ()).get (0 );
124
126
ModelSizeStats modelSizeStats = jobStats .getModelSizeStats ();
125
- assertThat (modelSizeStats .getModelBytes (), lessThan (36000000L ));
126
- assertThat (modelSizeStats .getModelBytes (), greaterThan (30000000L ));
127
+ assertThat (modelSizeStats .getModelBytes (), lessThan (31500000L ));
128
+ assertThat (modelSizeStats .getModelBytes (), greaterThan (25000000L ));
127
129
assertThat (modelSizeStats .getMemoryStatus (), equalTo (ModelSizeStats .MemoryStatus .HARD_LIMIT ));
128
130
}
129
131
132
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/ml-cpp/pulls/122" )
130
133
public void testTooManyByAndOverFields () throws Exception {
131
134
Detector .Builder detector = new Detector .Builder ("count" , null );
132
135
detector .setByFieldName ("department" );
@@ -171,11 +174,12 @@ public void testTooManyByAndOverFields() throws Exception {
171
174
// Assert we haven't violated the limit too much
172
175
GetJobsStatsAction .Response .JobStats jobStats = getJobStats (job .getId ()).get (0 );
173
176
ModelSizeStats modelSizeStats = jobStats .getModelSizeStats ();
174
- assertThat (modelSizeStats .getModelBytes (), lessThan (36000000L ));
177
+ assertThat (modelSizeStats .getModelBytes (), lessThan (31500000L ));
175
178
assertThat (modelSizeStats .getModelBytes (), greaterThan (24000000L ));
176
179
assertThat (modelSizeStats .getMemoryStatus (), equalTo (ModelSizeStats .MemoryStatus .HARD_LIMIT ));
177
180
}
178
181
182
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/ml-cpp/pulls/122" )
179
183
public void testManyDistinctOverFields () throws Exception {
180
184
Detector .Builder detector = new Detector .Builder ("sum" , "value" );
181
185
detector .setOverFieldName ("user" );
@@ -221,9 +225,9 @@ public void testManyDistinctOverFields() throws Exception {
221
225
// Assert we haven't violated the limit too much
222
226
GetJobsStatsAction .Response .JobStats jobStats = getJobStats (job .getId ()).get (0 );
223
227
ModelSizeStats modelSizeStats = jobStats .getModelSizeStats ();
224
- assertThat (modelSizeStats .getModelBytes (), lessThan (90000000L ));
225
- assertThat (modelSizeStats .getModelBytes (), greaterThan (75000000L ));
226
- assertThat (modelSizeStats .getMemoryStatus (), equalTo (ModelSizeStats .MemoryStatus .OK ));
228
+ assertThat (modelSizeStats .getModelBytes (), lessThan (116000000L ));
229
+ assertThat (modelSizeStats .getModelBytes (), greaterThan (90000000L ));
230
+ assertThat (modelSizeStats .getMemoryStatus (), equalTo (ModelSizeStats .MemoryStatus .HARD_LIMIT ));
227
231
}
228
232
229
233
private static Map <String , Object > createRecord (long timestamp , String user , String department ) {
0 commit comments