diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index d38b50b70c63c90e6bbb618386e0ed897087e6f1..c73aaae08489c25a40163d4edb1607247fae010a 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -68,6 +68,18 @@ class TheodoliteExecutor( afterTeardownDelay = config.execution.afterTeardownDelay ) + if (config.load.loadValues != config.load.loadValues.sorted()) { + config.load.loadValues = config.load.loadValues.sorted() + logger.info { "Load values are not sorted correctly, Theodolite sorts them in ascending order." + + "New order is: ${config.load.loadValues}" } + } + + if (config.resources.resourceValues != config.resources.resourceValues.sorted()) { + config.resources.resourceValues = config.resources.resourceValues.sorted() + logger.info { "Load values are not sorted correctly, Theodolite sorts them in ascending order." + + "New order is: ${config.resources.resourceValues}" } + } + return Config( loads = config.load.loadValues.map { load -> LoadDimension(load, loadDimensionPatcherDefinition) }, resources = config.resources.resourceValues.map { resource ->