From 964887f8bd0d4728639f37a5718181ac38744b02 Mon Sep 17 00:00:00 2001 From: Valentin Mitrofanov Date: Wed, 5 Apr 2023 14:33:25 +0800 Subject: [PATCH] fix #6625 - reverse assertEquals params Signed-off-by: Valentin Mitrofanov --- .../org/opensearch/index/translog/LocalTranslogTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/test/java/org/opensearch/index/translog/LocalTranslogTests.java b/server/src/test/java/org/opensearch/index/translog/LocalTranslogTests.java index f8dec180f70e1..9443417d80885 100644 --- a/server/src/test/java/org/opensearch/index/translog/LocalTranslogTests.java +++ b/server/src/test/java/org/opensearch/index/translog/LocalTranslogTests.java @@ -3228,13 +3228,13 @@ public void testWithRandomException() throws IOException { syncedDocs.addAll(unsynced); unsynced.clear(); } catch (TranslogException | MockDirectoryWrapper.FakeIOException ex) { - assertEquals(failableTLog.getTragicException(), ex); + assertEquals(ex, failableTLog.getTragicException()); } catch (IOException ex) { assertEquals(ex.getMessage(), "__FAKE__ no space left on device"); - assertEquals(failableTLog.getTragicException(), ex); + assertEquals(ex, failableTLog.getTragicException()); } catch (RuntimeException ex) { assertEquals(ex.getMessage(), "simulated"); - assertEquals(failableTLog.getTragicException(), ex); + assertEquals(ex, failableTLog.getTragicException()); } finally { Checkpoint checkpoint = Translog.readCheckpoint(config.getTranslogPath()); if (checkpoint.numOps == unsynced.size() + syncedDocs.size()) {