Skip to content

Commit

Permalink
[DOCS] Check for Windows and *nix file paths (#31648)
Browse files Browse the repository at this point in the history
Proper cleanup of the docs snippet tests depends on detecting
what is being tested (ML, Watcher, etc) this is deduced from
the file path and so we must account for Windows and Unix path
separators
  • Loading branch information
davidkyle committed Jul 3, 2018
1 parent ec01665 commit 2fb2bb2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void reenableWatcher() throws Exception {
@Override
protected boolean isWatcherTest() {
String testName = getTestName();
return testName != null && testName.contains("watcher/");
return testName != null && (testName.contains("watcher/") || testName.contains("watcher\\"));
}

@Override
Expand All @@ -115,13 +115,13 @@ protected boolean isMonitoringTest() {
@Override
protected boolean isMachineLearningTest() {
String testName = getTestName();
return testName != null && testName.contains("ml/");
return testName != null && (testName.contains("ml/") || testName.contains("ml\\"));
}

@Override
protected boolean isRollupTest() {
String testName = getTestName();
return testName != null && testName.contains("rollup/");
return testName != null && (testName.contains("rollup/") || testName.contains("rollup\\"));
}

/**
Expand Down

0 comments on commit 2fb2bb2

Please sign in to comment.