Skip to content
Snippets Groups Projects
Commit 6a24db47 authored by srosse's avatar srosse
Browse files

no-jira: wording, enhance unit test

parent aaabadf1
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ Contributors and copy right holders of openolat.org codebase since 2011:
Michael Enz, Christian Franck, Florian Gnägi, Roman Haag, Joël Krähemann, Matthai Kurian, Stéphane Rossé,
Kirsten Scherer, Sergio Trentini
- BPS Bildungsportal Sachsen GmbH, Germany [http://www.bildungsportal.sachsen.de]:
Armin Blawitzki, Stefan Köber, Sven Morgener
Armin Blawitzki, Stefan Köber, Sven Morgner
- VCRP Virtueller Campus Rheinland-Pfalz [http://www.vcrp.de]
Stephan Clemenz
- Rain and Hail Agricultural Insurance [http://www.rainhail.com]
......
......@@ -32,7 +32,7 @@ Contributors and copy right holders of openolat.org codebase since 2011:
Michael Enz, Christian Franck, Florian Gnägi, Roman Haag, Joël Krähemann, Matthai Kurian, Stéphane Rossé,
Kirsten Scherer, Sergio Trentini
- BPS Bildungsportal Sachsen GmbH, Germany [http://www.bildungsportal.sachsen.de]:
Armin Blawitzki, Stefan Köber, Sven Morgener
Armin Blawitzki, Stefan Köber, Sven Morgner
- VCRP Virtueller Campus Rheinland-Pfalz [http://www.vcrp.de]
Stephan Clemenz
......
......@@ -70,7 +70,7 @@ no=Non
notifications.entry=Message "{0}" \u00E9tabli par {1}
notifications.entry.modified=Message "{0}" de {1} a \u00E9t\u00E9 modifi\u00E9
notifications.header=Il y a des nouveaux messages dans un des forums que vous avez abonn\u00E9s\:
notifications.header.course=Formu dans le cours "{0}"
notifications.header.course=Forum dans le cours "{0}"
notifications.header.group=Forum dans groupe "{0}"
open.thread=Ouvrir discussion
reallydeleteAtt=Voulez-vous vraiment supprimer ce(s) fichier(s)?
......
......@@ -65,16 +65,16 @@
</bean>
<bean id="acReservationCleanupJob" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<bean class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass" value="org.olat.resource.accesscontrol.manager.ReservationsJob" />
</bean>
</property>
<property name="jobDetail" ref="acReservationCleanupJobDetail"/>
<!-- 60 seconds -->
<property name="repeatInterval" value="60000"/>
<property name="startDelay" value="30000" />
</bean>
<bean id="acReservationCleanupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass" value="org.olat.resource.accesscontrol.manager.ReservationsJob" />
</bean>
<bean id="acOfferManager" class="org.olat.resource.accesscontrol.manager.ACOfferManagerImpl">
<property name="dbInstance" ref="database"/>
</bean>
......
......@@ -26,10 +26,9 @@ import java.util.UUID;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.olat.core.commons.persistence.DB;
import org.olat.core.commons.persistence.DBFactory;
import org.olat.core.id.Identity;
import org.olat.core.logging.OLog;
import org.olat.core.logging.Tracing;
......@@ -38,6 +37,8 @@ import org.olat.resource.accesscontrol.manager.ACReservationDAO;
import org.olat.resource.accesscontrol.model.ResourceReservation;
import org.olat.test.JunitTestHelper;
import org.olat.test.OlatTestCase;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
/**
......@@ -48,18 +49,19 @@ public class ACReservationDAOTest extends OlatTestCase {
private final OLog log = Tracing.createLoggerFor(ACReservationDAOTest.class);
@Autowired
private Scheduler scheduler;
@Autowired
private DB dbInstance;
@Autowired
private ACReservationDAO acReservationDao;
@After
public void tearDown() throws Exception {
@Before
public void interruptReservationJob() {
try {
DBFactory.getInstance().commitAndCloseSession();
} catch (Exception e) {
log.error("Exception in tearDown(): " + e);
throw e;
scheduler.pauseJob("acReservationCleanupJobDetail", Scheduler.DEFAULT_GROUP);
} catch (SchedulerException e) {
log.error("Cannot intterupt the reservation job.", e);
}
}
......@@ -156,7 +158,7 @@ public class ACReservationDAOTest extends OlatTestCase {
cal.add(Calendar.SECOND, -2);
Date date = cal.getTime();
List<ResourceReservation> oldReservations = acReservationDao.loadExpiredReservation(date);
Assert.assertNotNull(oldReservations);
Assert.assertNotNull("Old reservations cannot be null", oldReservations);
Assert.assertFalse(oldReservations.isEmpty());
Assert.assertTrue(oldReservations.contains(reservation1));
Assert.assertTrue(oldReservations.contains(reservation2));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment