[ML] Fix categorization integration test following fix to C++ code (elastic/x-pack-elasticsearch#3483)
The categorization integration tests were picking up a bug in the C++ categorization code, but the expected results were set incorrectly to match the incorrect C++ output. This change adjusts the expected results to reflect what is really expected. It also mutes the tests to avoid failures while the C++ fix propagates through the build process. The tests will be unmuted tomorrow. Relates elastic/machine-learning-cpp#512 Original commit: elastic/x-pack-elasticsearch@d2b57b6216
This commit is contained in:
parent
1586836920
commit
d7416d53e0
|
@ -81,6 +81,7 @@ public class CategorizationIT extends MlNativeAutodetectIntegTestCase {
|
|||
client().admin().indices().prepareRefresh("*").get();
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/machine-learning-cpp/pull/512")
|
||||
public void testBasicCategorization() throws Exception {
|
||||
Job.Builder job = newJobBuilder("categorization", Collections.emptyList());
|
||||
registerJob(job);
|
||||
|
@ -101,7 +102,7 @@ public class CategorizationIT extends MlNativeAutodetectIntegTestCase {
|
|||
assertThat(categories.size(), equalTo(3));
|
||||
|
||||
CategoryDefinition category1 = categories.get(0);
|
||||
assertThat(category1.getRegex(), equalTo(".*?started.*"));
|
||||
assertThat(category1.getRegex(), equalTo(".*?Node.+?started.*"));
|
||||
assertThat(category1.getExamples(),
|
||||
equalTo(Arrays.asList("Node 1 started", "Node 2 started")));
|
||||
|
||||
|
@ -127,6 +128,7 @@ public class CategorizationIT extends MlNativeAutodetectIntegTestCase {
|
|||
equalTo(Arrays.asList("Node 1 started", "Node 2 started", "Node 3 started")));
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/machine-learning-cpp/pull/512")
|
||||
public void testCategorizationWithFilters() throws Exception {
|
||||
Job.Builder job = newJobBuilder("categorization-with-filters", Arrays.asList("\\[.*\\]"));
|
||||
registerJob(job);
|
||||
|
@ -147,7 +149,7 @@ public class CategorizationIT extends MlNativeAutodetectIntegTestCase {
|
|||
assertThat(categories.size(), equalTo(2));
|
||||
|
||||
CategoryDefinition category1 = categories.get(0);
|
||||
assertThat(category1.getRegex(), equalTo(".*?started.*"));
|
||||
assertThat(category1.getRegex(), equalTo(".*?Node.+?started.*"));
|
||||
assertThat(category1.getExamples(),
|
||||
equalTo(Arrays.asList("Node 1 started", "Node 2 started")));
|
||||
|
||||
|
|
Loading…
Reference in New Issue