Revision 468cd076
Added by Andreas Müller over 2 years ago
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/security/PasswordResetServiceTest.java | ||
---|---|---|
26 | 26 |
import org.junit.After; |
27 | 27 |
import org.junit.Before; |
28 | 28 |
import org.junit.Test; |
29 |
import org.springframework.beans.factory.annotation.Autowired; |
|
30 |
import org.springframework.core.env.Environment; |
|
31 | 29 |
import org.springframework.mail.javamail.JavaMailSender; |
32 | 30 |
import org.springframework.util.concurrent.ListenableFuture; |
33 | 31 |
import org.subethamail.wiser.Wiser; |
... | ... | |
49 | 47 |
*/ |
50 | 48 |
public class PasswordResetServiceTest extends eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest { |
51 | 49 |
|
52 |
private static final double maxRequestRate = 4.0;
|
|
50 |
private static final Logger logger = Logger.getLogger(PasswordResetServiceTest.class);
|
|
53 | 51 |
|
54 |
Logger logger = Logger.getLogger(PasswordResetServiceTest.class);
|
|
52 |
private static final double maxRequestRate = 4.0;
|
|
55 | 53 |
|
56 | 54 |
private static final int rateLimiterTimeout = 200; |
57 | 55 |
private static final String userName = "pwdResetTestUser"; |
... | ... | |
59 | 57 |
private static final String newPWD = "NEW_123_new_456"; |
60 | 58 |
private static final String userEmail = "pwdResetTestUser@cybertaxonomy.test"; |
61 | 59 |
|
62 |
|
|
63 | 60 |
private static String base64UrlSaveCharClass = "[a-zA-Z0-9\\-_]"; |
64 | 61 |
|
65 |
|
|
66 | 62 |
private static final String requestFormUrlTemplate = "http://cybertaxonomy.test/passwordReset?userName={%s}&sessID=f8d8sf8dsf"; |
67 | 63 |
|
68 | 64 |
@SpringBeanByType |
... | ... | |
77 | 73 |
@SpringBeanByType |
78 | 74 |
private JavaMailSender emailSender; |
79 | 75 |
|
80 |
@Autowired |
|
81 |
private Environment env; |
|
82 |
|
|
83 | 76 |
private Wiser wiser = null; |
84 | 77 |
|
85 | 78 |
private CountDownLatch resetTokenSendSignal; |
... | ... | |
265 | 258 |
resetTokenSendSignal.countDown(); |
266 | 259 |
}); |
267 | 260 |
|
268 |
|
|
269 | 261 |
// -- wait for passwordResetService.emailResetToken() to complete |
270 | 262 |
resetTokenSendSignal.await(); |
271 | 263 |
|
... | ... | |
300 | 292 |
} |
301 | 293 |
|
302 | 294 |
@Override |
303 |
public void createTestDataSet() throws FileNotFoundException { |
|
304 |
// not needed |
|
305 |
} |
|
306 |
|
|
307 |
} |
|
295 |
public void createTestDataSet() throws FileNotFoundException {} |
|
296 |
} |
Also available in: Unified diff
cleanup