|
33 | 33 | public class AutodetectMemoryLimitIT extends MlNativeAutodetectIntegTestCase { |
34 | 34 |
|
35 | 35 | @After |
36 | | - public void cleanUpTest() throws Exception { |
| 36 | + public void cleanUpTest() { |
37 | 37 | cleanUp(); |
38 | 38 | } |
39 | 39 |
|
@@ -75,19 +75,10 @@ public void testTooManyPartitions() throws Exception { |
75 | 75 | closeJob(job.getId()); |
76 | 76 |
|
77 | 77 | // Assert we haven't violated the limit too much |
78 | | - // and a balance of partitions/by fields were created |
79 | 78 | GetJobsStatsAction.Response.JobStats jobStats = getJobStats(job.getId()).get(0); |
80 | 79 | ModelSizeStats modelSizeStats = jobStats.getModelSizeStats(); |
81 | 80 | assertThat(modelSizeStats.getModelBytes(), lessThan(35000000L)); |
82 | 81 | assertThat(modelSizeStats.getModelBytes(), greaterThan(30000000L)); |
83 | | - |
84 | | - // it is important to check that while we rejected partitions, we still managed |
85 | | - // to create some by fields; it shows we utilize memory in a meaningful way |
86 | | - // rather than creating empty partitions |
87 | | - assertThat(modelSizeStats.getTotalPartitionFieldCount(), lessThan(900L)); |
88 | | - assertThat(modelSizeStats.getTotalPartitionFieldCount(), greaterThan(650L)); |
89 | | - assertThat(modelSizeStats.getTotalByFieldCount(), lessThan(900L)); |
90 | | - assertThat(modelSizeStats.getTotalByFieldCount(), greaterThan(650L)); |
91 | 82 | assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT)); |
92 | 83 | } |
93 | 84 |
|
@@ -133,8 +124,6 @@ public void testTooManyByFields() throws Exception { |
133 | 124 | ModelSizeStats modelSizeStats = jobStats.getModelSizeStats(); |
134 | 125 | assertThat(modelSizeStats.getModelBytes(), lessThan(36000000L)); |
135 | 126 | assertThat(modelSizeStats.getModelBytes(), greaterThan(30000000L)); |
136 | | - assertThat(modelSizeStats.getTotalByFieldCount(), lessThan(1900L)); |
137 | | - assertThat(modelSizeStats.getTotalByFieldCount(), greaterThan(1500L)); |
138 | 127 | assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT)); |
139 | 128 | } |
140 | 129 |
|
@@ -184,9 +173,6 @@ public void testTooManyByAndOverFields() throws Exception { |
184 | 173 | ModelSizeStats modelSizeStats = jobStats.getModelSizeStats(); |
185 | 174 | assertThat(modelSizeStats.getModelBytes(), lessThan(36000000L)); |
186 | 175 | assertThat(modelSizeStats.getModelBytes(), greaterThan(24000000L)); |
187 | | - assertThat(modelSizeStats.getTotalByFieldCount(), equalTo(7L)); |
188 | | - assertThat(modelSizeStats.getTotalOverFieldCount(), greaterThan(40000L)); |
189 | | - assertThat(modelSizeStats.getTotalOverFieldCount(), lessThan(50000L)); |
190 | 176 | assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.HARD_LIMIT)); |
191 | 177 | } |
192 | 178 |
|
@@ -237,7 +223,6 @@ public void testManyDistinctOverFields() throws Exception { |
237 | 223 | ModelSizeStats modelSizeStats = jobStats.getModelSizeStats(); |
238 | 224 | assertThat(modelSizeStats.getModelBytes(), lessThan(90000000L)); |
239 | 225 | assertThat(modelSizeStats.getModelBytes(), greaterThan(75000000L)); |
240 | | - assertThat(modelSizeStats.getTotalOverFieldCount(), greaterThan(140000L)); |
241 | 226 | assertThat(modelSizeStats.getMemoryStatus(), equalTo(ModelSizeStats.MemoryStatus.OK)); |
242 | 227 | } |
243 | 228 |
|
|
0 commit comments