Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
stalep committed Oct 13, 2023
1 parent 8fa8acf commit ec6f51d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void notifyAll(int testId, Consumer<Notification> consumer) {
List<Object[]> results = em.createNativeQuery(GET_NOTIFICATIONS)
.setParameter(1, testId).getResultList();
if (results.isEmpty()) {
log.warnf("There are no subscribers for notification on test %d!", testId);
log.infof("There are no subscribers for notification on test %d!", testId);
}
for (Object[] pair : results) {
if (pair.length != 3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,13 @@ void findRunsWithUri(String uri, BiConsumer<Integer, Integer> consumer) {
@Transactional
void onNewOrUpdatedSchemaForRun(int runId, int schemaId) {
em.createNativeQuery("SELECT update_run_schemas(?1)::::text").setParameter(1, runId).getSingleResult();
//clear tables on schemaId
//clear validation error tables by schemaId
em.createNativeQuery("DELETE FROM dataset_validationerrors WHERE schema_id = ?1")
.setParameter(1, schemaId).executeUpdate();
em.createNativeQuery("DELETE FROM run_validationerrors WHERE schema_id = ?1")
.setParameter(1, schemaId).executeUpdate();

transform(runId, true);
// mediator.validateSchema(schemaId);
}

@PermitAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import io.hyperfoil.tools.horreum.mapper.LabelMapper;
import io.hyperfoil.tools.horreum.test.HorreumTestProfile;
import org.jboss.logging.Logger;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.TestInfo;
import org.mockito.Mockito;

Expand Down Expand Up @@ -722,6 +721,7 @@ public void testRandomOrder(TestInfo info) throws InterruptedException {
long now = System.currentTimeMillis();
for (int i = 0; i < order.length; ++i) {
uploadRun(now + i, runWithValue(values[order[i]], schema).put("timestamp", order[i]), test.name);
Thread.sleep(100); //add sleep, might make the test fail less often
}
drainQueue(datapointQueue, order.length);
drainQueue(changeQueue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import io.hyperfoil.tools.horreum.api.data.Extractor;
import io.hyperfoil.tools.horreum.entity.data.*;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.TestInfo;

import com.fasterxml.jackson.databind.JsonNode;
Expand Down

0 comments on commit ec6f51d

Please sign in to comment.