Skip to content

Commit

Permalink
fixed tests and test new laptopinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Nov 10, 2023
1 parent 8b452a9 commit 1498fa4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public interface ExamDAO extends ActivatableEntityDAO<Exam, Exam>, BulkActionSup
@CacheEvict(
cacheNames = ExamSessionCacheService.CACHE_NAME_RUNNING_EXAM,
key = "#examId")
String getAppSigantureKeySalt(Long examId);
String getAppSignatureKeySalt(Long examId);

/** Saves the Exam and updates the running exam cache. */
@Override
Expand Down Expand Up @@ -171,7 +171,6 @@ default Result<Exam> releaseLock(final Exam exam, final String updateId) {

/** Use this to check if the exam is up to date
*
* @param examId the exam identifier
* @param exam the exam to check if it is in sync with the persistent or if there is a newer version
* @return Result refer to the up-to-date result or to an error if happened */
Result<Boolean> upToDate(Exam exam);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public Result<AdditionalAttributeRecord> saveAdditionalAttribute(
return this.additionalAttributeRecordMapper
.selectByPrimaryKey(rec.getId());
} else {

final AdditionalAttributeRecord rec = new AdditionalAttributeRecord(
null,
type.name(),
Expand All @@ -170,6 +171,7 @@ public Result<AdditionalAttributeRecord> saveAdditionalAttribute(
}

@Override
@Transactional
public boolean initAdditionalAttribute(
final EntityType type,
final Long entityId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public void setModified(final Long examId) {
}

@Override
public String getAppSigantureKeySalt(final Long examId) {
public synchronized String getAppSignatureKeySalt(final Long examId) {
final CharSequence salt = KeyGenerators.string().generateKey();
this.additionalAttributesDAO.initAdditionalAttribute(
EntityType.EXAM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public Result<String> getAppSignatureKeySalt(final Long examId) {
return salt;
}

return this.examDAO.getAppSigantureKeySalt(examId);
return this.examDAO.getAppSignatureKeySalt(examId);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public String notifyPing(final String connectionToken, final String instructionC
log.error("Failed to get ClientConnectionDataInternal for: {}", connectionToken);
}

if (instructionConfirm != StringUtils.EMPTY) {
if (StringUtils.isNotBlank(instructionConfirm)) {
this.sebClientInstructionService.confirmInstructionDone(connectionToken, instructionConfirm);
}

Expand Down

0 comments on commit 1498fa4

Please sign in to comment.