From 665c97efd453312e43c5ec0ea38dba2b483340af Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Tue, 30 Jul 2024 14:38:14 +0100 Subject: Fix ordering issue in QueryServiceIntegrationSpec A test intermittently fails due to comparing unordered list. Fix is to compare as a set. Issue-ID: CPS-2337 Signed-off-by: danielhanrahan Change-Id: I84bc4f7d9ff01ca7b36ecb56835387dbea6b24d1 --- .../cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy index fd9aa54051..69598a0604 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy @@ -383,7 +383,7 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase { def result = objectUnderTest.queryDataNodesAcrossAnchors(FUNCTIONAL_TEST_DATASPACE_1, '/bookstore', OMIT_DESCENDANTS, new PaginationOption(pageIndex, pageSize)) then: 'correct bookstore names are queried' def bookstoreNames = result.collect { it.getLeaves().get('bookstore-name') } - assert bookstoreNames.toList() == expectedBookstoreNames + assert bookstoreNames.toSet() == expectedBookstoreNames.toSet() and: 'the correct number of page size is returned' assert result.size() == expectedPageSize and: 'the queried nodes have expected anchor names' -- cgit 1.2.3-korg