From f8ecd2516136d9dd567ba17924616688e9fea0cf Mon Sep 17 00:00:00 2001 From: Drew Baugher <46505179+dbbaughe@users.noreply.github.com> Date: Mon, 1 Feb 2021 09:57:02 -0800 Subject: [PATCH] Preserving indices causes seqNo to increase for jobs that aren't fully cleaned up (#397) --- .../resthandler/IndexStateManagementRestApiIT.kt | 2 +- .../rollup/resthandler/RestIndexRollupActionIT.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/indexstatemanagement/resthandler/IndexStateManagementRestApiIT.kt b/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/indexstatemanagement/resthandler/IndexStateManagementRestApiIT.kt index e9b8bf8e3..6fd9d9675 100644 --- a/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/indexstatemanagement/resthandler/IndexStateManagementRestApiIT.kt +++ b/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/indexstatemanagement/resthandler/IndexStateManagementRestApiIT.kt @@ -200,7 +200,7 @@ class IndexStateManagementRestApiIT : IndexStateManagementRestTestCase() { val updatedSeqNo = (responseBody[_SEQ_NO] as Int).toLong() assertNotEquals("response is missing Id", Policy.NO_ID, updatedId) assertEquals("not same id", policy.id, updatedId) - assertEquals("incorrect seqNo", policy.seqNo + 1, updatedSeqNo) + assertTrue("incorrect seqNo", policy.seqNo < updatedSeqNo) } @Throws(Exception::class) diff --git a/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/rollup/resthandler/RestIndexRollupActionIT.kt b/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/rollup/resthandler/RestIndexRollupActionIT.kt index 277af3f54..0089c774d 100644 --- a/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/rollup/resthandler/RestIndexRollupActionIT.kt +++ b/src/test/kotlin/com/amazon/opendistroforelasticsearch/indexmanagement/rollup/resthandler/RestIndexRollupActionIT.kt @@ -121,7 +121,7 @@ class RestIndexRollupActionIT : RollupRestTestCase() { val updatedSeqNo = (responseBody[_SEQ_NO] as Int).toLong() assertNotEquals("response is missing Id", Rollup.NO_ID, updatedId) assertEquals("not same id", rollup.id, updatedId) - assertEquals("incorrect seqNo", rollup.seqNo + 1, updatedSeqNo) + assertTrue("incorrect seqNo", rollup.seqNo < updatedSeqNo) } @Throws(Exception::class)