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

set test result to redeemed 9 for old tests #210

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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