mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Fix the monitoring bwc tests
This explicitly shuts down monitoring at the end of every index which should help prevent the shutdown problems we were seeing. Original commit: elastic/x-pack-elasticsearch@2be0ee0df8
This commit is contained in:
parent
697a11ad02
commit
3b11e764a9
@ -78,14 +78,18 @@ public class OldMonitoringIndicesBackwardsCompatibilityIT extends AbstractOldXPa
|
||||
settings.putProperties(httpExporter, k -> true, k -> MonitoringSettings.EXPORTERS_SETTINGS.getKey() + "my_exporter." + k);
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl="waiting until stable")
|
||||
@Override
|
||||
public void testOldIndexes() throws Exception {
|
||||
super.testOldIndexes();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkVersion(Version version) throws Exception {
|
||||
try {
|
||||
checkVersionInternal(version);
|
||||
} finally {
|
||||
/* Shut down monitoring after every test because we've shrunk the collection interval enough that we'll have trouble shutting
|
||||
* down cleanly unless we force monitoring to stop. */
|
||||
internalCluster().getInstance(AgentService.class).stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkVersionInternal(Version version) throws Exception {
|
||||
if (version.before(Version.V_2_3_0)) {
|
||||
/* We can't do anything with indexes created before 2.3 so we just assert that we didn't delete them or do anything otherwise
|
||||
* crazy. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user