You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2023/08/23 09:40:00 UTC
[jackrabbit-oak] 01/01: OAK-10415: AbstractTwoNodeTest: make teardown more robust
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch OAK-10415
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit 53e612eb033f6c08a181f36b7871d31d8bd3f522
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Wed Aug 23 10:39:42 2023 +0100
OAK-10415: AbstractTwoNodeTest: make teardown more robust
---
.../oak/plugins/document/AbstractTwoNodeTest.java | 35 ++++++++++++----------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
index de314933ab..464b0ca19a 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractTwoNodeTest.java
@@ -130,23 +130,26 @@ public class AbstractTwoNodeTest {
@After
public void tearDown() throws Exception {
- if (ds1 != null) {
- ds1.dispose();
+ try {
+ if (ds2 != null) {
+ ds2.dispose();
+ }
+ if (ds1 != null) {
+ ds1.dispose();
+ }
+ if (store2 != null) {
+ store2.dispose();
+ }
+ if (store1 != null) {
+ store1.dispose();
+ }
+ if (fixture != null) {
+ fixture.dispose();
+ }
+ } finally {
+ ClusterNodeInfo.resetClockToDefault();
+ Revision.resetClockToDefault();
}
- if (ds2 != null) {
- ds2.dispose();
- }
- if (store1 != null) {
- store1.dispose();
- }
- if (store2 != null) {
- store2.dispose();
- }
- if (fixture != null) {
- fixture.dispose();
- }
- ClusterNodeInfo.resetClockToDefault();
- Revision.resetClockToDefault();
}
private static DocumentStore wrap(DocumentStore ds) {