Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
set test result to redeemed 9 for old tests (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmann-dierk authored Dec 14, 2021
1 parent b67566b commit 88f3b91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/java/app/coronawarn/quicktest/model/TestResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public enum TestResult {
PENDING("pending", (short) 5),
NEGATIVE("negative", (short) 6),
POSITIVE("positive", (short) 7),
FAILED("failed", (short) 8);
FAILED("failed", (short) 8),
REDEEMED("redeemed", (short) 9);

static final Map<String, TestResult> names = Arrays.stream(TestResult.values())
.collect(Collectors.toMap(TestResult::getName, Function.identity()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void handleChunk(LocalDateTime deleteTimestamp, int chunkSize, int chunks

quickTestChunk.forEach(quickTest -> sendResultToTestResultServer(
quickTest.getTestResultServerHash(),
TestResult.FAILED.getValue(),
TestResult.REDEEMED.getValue(),
deleteTimestamp.toEpochSecond(ZoneOffset.UTC),
quickTest.getConfirmationCwa() != null ? quickTest.getConfirmationCwa() : false));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ void removeAllBeforeTest() {
QuickTest quickTest = new QuickTest();
quickTest.setConfirmationCwa(true);
quickTest.setTestResultServerHash("");
quickTest.setTestResult((short) 8);
quickTest.setTestResult((short) 9);
quickTest.setUpdatedAt(now);

QuickTest quickTest1 = new QuickTest();
quickTest1.setConfirmationCwa(false);
quickTest1.setTestResultServerHash("");
quickTest1.setTestResult((short) 8);
quickTest1.setTestResult((short) 9);
quickTest1.setUpdatedAt(now);


Expand Down

0 comments on commit 88f3b91

Please sign in to comment.