diff options
author | 2022-02-15 09:29:32 +0000 | |
---|---|---|
committer | 2022-02-15 10:49:02 +0000 | |
commit | 4a9a11e170ebcc47ef20f7055184ce66f7994415 (patch) | |
tree | f687956d986339aa1ecc476f545db3cc262c1e6d /feature-lifecycle/src/test/java/org | |
parent | e9d1d70a203d06c3f0e4695c3710b527b0a6eab3 (diff) |
Fix intermittent failure in metrics test
When the registry is cleared, it removes the Prometheus counters that
are initialized by static definition causing the metrics test to fail.
This issue occurs when this test is not invoked first in the order of
test execution in feature-lifecycle.
Issue-ID: POLICY-3832
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I9a55910bc39dbe1ad9f1153809bdf78bac3040b1
Diffstat (limited to 'feature-lifecycle/src/test/java/org')
-rw-r--r-- | feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java index b8139e6e..7676929d 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2022 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -109,7 +110,6 @@ public class RestLifecycleManagerTest { */ @Before public void setUp() throws Exception { - CollectorRegistry.defaultRegistry.clear(); SystemPersistenceConstants.getManager().setConfigurationDir("target/test-classes"); fsm = newFsmInstance(); @@ -170,7 +170,6 @@ public class RestLifecycleManagerTest { PolicyControllerConstants.getFactory().destroy(); SystemPersistenceConstants.getManager().setConfigurationDir(null); - CollectorRegistry.defaultRegistry.clear(); } @Test |