From 5d96c79b45d74035227f0c6fa149a66c641ba1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A5le=20Pedersen?= Date: Sat, 7 Oct 2023 21:34:10 +0200 Subject: [PATCH] fixes #726 for real --- .../io/hyperfoil/tools/horreum/svc/ExperimentServiceImpl.java | 2 +- .../java/io/hyperfoil/tools/horreum/svc/RunServiceTest.java | 4 ++-- .../java/io/hyperfoil/tools/horreum/it/HorreumClientIT.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/horreum-backend/src/main/java/io/hyperfoil/tools/horreum/svc/ExperimentServiceImpl.java b/horreum-backend/src/main/java/io/hyperfoil/tools/horreum/svc/ExperimentServiceImpl.java index 7f9afeb2c..bddc08b84 100644 --- a/horreum-backend/src/main/java/io/hyperfoil/tools/horreum/svc/ExperimentServiceImpl.java +++ b/horreum-backend/src/main/java/io/hyperfoil/tools/horreum/svc/ExperimentServiceImpl.java @@ -248,7 +248,7 @@ private void runExperiments(DataSet.Info info, Consumer result ExperimentProfileDAO profile = ExperimentProfileDAO.findById(entry.getKey()); Map> byVar = new HashMap<>(); List variableIds = profile.comparisons.stream().map(ExperimentComparisonDAO::getVariableId).collect(Collectors.toList()); - DataPointDAO.find("dataset.id IN ?1 AND variable.id IN ?2", Sort.descending("timestamp", "dataset_id"), entry.getValue(), variableIds) + DataPointDAO.find("dataset.id IN ?1 AND variable.id IN ?2", Sort.descending("timestamp", "dataset.id"), entry.getValue(), variableIds) .stream().forEach(dp -> byVar.computeIfAbsent(dp.variable.id, v -> new ArrayList<>()).add(dp)); Map results = new HashMap<>(); for (var comparison : profile.comparisons) { diff --git a/horreum-backend/src/test/java/io/hyperfoil/tools/horreum/svc/RunServiceTest.java b/horreum-backend/src/test/java/io/hyperfoil/tools/horreum/svc/RunServiceTest.java index a3edeaf38..8545f4a57 100644 --- a/horreum-backend/src/test/java/io/hyperfoil/tools/horreum/svc/RunServiceTest.java +++ b/horreum-backend/src/test/java/io/hyperfoil/tools/horreum/svc/RunServiceTest.java @@ -778,13 +778,13 @@ public void runExperiment() throws InterruptedException { Label lblBuildID = new Label(); lblBuildID.name = "build-id"; - Extractor buildIDExtractor = new Extractor("build-id", "$.build-id", false); + Extractor buildIDExtractor = new Extractor("build-id", "$.\"build-id\"", false); lblBuildID.extractors = List.of(buildIDExtractor); lblBuildID.access = Access.PUBLIC; lblBuildID.owner = test.owner; lblBuildID.metrics = false; lblBuildID.filtering = true; - //lblBuildID.id = addOrUpdateLabel(schema.id, lblBuildID); + lblBuildID.id = addOrUpdateLabel(schema.id, lblBuildID); //3. Config change detection variables Variable variable = new Variable(); diff --git a/horreum-integration-tests/src/test/java/io/hyperfoil/tools/horreum/it/HorreumClientIT.java b/horreum-integration-tests/src/test/java/io/hyperfoil/tools/horreum/it/HorreumClientIT.java index c3d765b65..2c05cde97 100644 --- a/horreum-integration-tests/src/test/java/io/hyperfoil/tools/horreum/it/HorreumClientIT.java +++ b/horreum-integration-tests/src/test/java/io/hyperfoil/tools/horreum/it/HorreumClientIT.java @@ -175,7 +175,7 @@ public void runExperiment() throws InterruptedException { Label lblBuildID = new Label(); lblBuildID.name = "build-id"; - Extractor buildIDExtractor = new Extractor("build-id", "$.build-id", false); + Extractor buildIDExtractor = new Extractor("build-id", "$.\"build-id\"", false); lblBuildID.extractors = List.of(buildIDExtractor); lblBuildID.access = Access.PUBLIC; lblBuildID.owner = dummyTest.owner;