test build
This commit is contained in:
parent
6cb2f78759
commit
c73fd355a4
3 changed files with 20 additions and 26 deletions
|
@ -163,7 +163,7 @@ public class LmsSetupDAOImpl implements LmsSetupDAO {
|
|||
final ClientCredentials proxyCredentials = createProxyClientCredentials(lmsSetup);
|
||||
final LmsSetupRecord newRecord = new LmsSetupRecord(
|
||||
lmsSetup.id,
|
||||
lmsSetup.institutionId,
|
||||
null,
|
||||
lmsSetup.name,
|
||||
(lmsSetup.lmsType != null) ? lmsSetup.lmsType.name() : null,
|
||||
lmsSetup.lmsApiUrl,
|
||||
|
@ -180,7 +180,7 @@ public class LmsSetupDAOImpl implements LmsSetupDAO {
|
|||
proxyCredentials.secretAsString(),
|
||||
savedRecord.getActive());
|
||||
|
||||
this.lmsSetupRecordMapper.updateByPrimaryKey(newRecord);
|
||||
this.lmsSetupRecordMapper.updateByPrimaryKeySelective(newRecord);
|
||||
return this.lmsSetupRecordMapper.selectByPrimaryKey(lmsSetup.id);
|
||||
})
|
||||
.flatMap(this::toDomainModel)
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import ch.ethz.seb.sebserver.gbl.Constants;
|
||||
|
@ -74,22 +73,22 @@ public class LmsAPIServiceImpl implements LmsAPIService {
|
|||
this.templateFactories = new EnumMap<>(factories);
|
||||
}
|
||||
|
||||
/** Listen to LmsSetupChangeEvent to release an affected LmsAPITemplate from cache
|
||||
*
|
||||
* @param event the event holding the changed LmsSetup */
|
||||
@EventListener
|
||||
public void notifyLmsSetupChange(final LmsSetupChangeEvent event) {
|
||||
final LmsSetup lmsSetup = event.getLmsSetup();
|
||||
if (lmsSetup == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("LmsSetup changed. Update cache by removing eventually used references");
|
||||
}
|
||||
|
||||
this.cache.remove(new CacheKey(lmsSetup.getModelId(), 0));
|
||||
}
|
||||
// /** Listen to LmsSetupChangeEvent to release an affected LmsAPITemplate from cache
|
||||
// *
|
||||
// * @param event the event holding the changed LmsSetup */
|
||||
// @EventListener
|
||||
// public void notifyLmsSetupChange(final LmsSetupChangeEvent event) {
|
||||
// final LmsSetup lmsSetup = event.getLmsSetup();
|
||||
// if (lmsSetup == null) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (log.isDebugEnabled()) {
|
||||
// log.debug("LmsSetup changed. Update cache by removing eventually used references");
|
||||
// }
|
||||
//
|
||||
// this.cache.remove(new CacheKey(lmsSetup.getModelId(), 0));
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void cleanup() {
|
||||
|
|
|
@ -768,9 +768,8 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
|||
final QuizData quizData = quizzes.content.get(0);
|
||||
assertNotNull(quizData);
|
||||
assertEquals("Demo Quiz 1 (MOCKUP)", quizData.name);
|
||||
|
||||
System.out.println("***************************** quizzes " + quizzes.content);
|
||||
|
||||
assertEquals(quizData.institutionId, Long.valueOf(4));
|
||||
assertEquals(quizData.lmsSetupId, Long.valueOf(1));
|
||||
// import quiz as exam
|
||||
final Result<Exam> newExamResult = restService
|
||||
.getBuilder(ImportAsExam.class)
|
||||
|
@ -780,10 +779,6 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
|||
.call();
|
||||
|
||||
assertNotNull(newExamResult);
|
||||
if (newExamResult.hasError()) {
|
||||
System.out.println("***************************** " + newExamResult.getError().getMessage());
|
||||
newExamResult.getError().printStackTrace();
|
||||
}
|
||||
assertFalse(newExamResult.hasError());
|
||||
final Exam newExam = newExamResult.get();
|
||||
|
||||
|
|
Loading…
Reference in a new issue