This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/1.22 by this push:
new 5096edcf6a OAK-10415: AbstractTwoNodeTest: make teardown more robust
(#1083)
5096edcf6a is described below
commit 5096edcf6a592bce3bcb584f52f0f1e0eacfe321
Author: Julian Reschke <[email protected]>
AuthorDate: Wed Aug 23 13:18:56 2023 +0200
OAK-10415: AbstractTwoNodeTest: make teardown more robust (#1083)
---
.../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 b102b6ca7a..0b3dfbcdae 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
@@ -119,23 +119,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) {