Skip to content

Commit de198e7

Browse files
committed
Using constants
1 parent 853506e commit de198e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

phase4-test/src/test/java/com/helger/phase4/server/servlet/UserMessageDuplicateTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import org.w3c.dom.Document;
2323
import org.w3c.dom.Node;
2424

25+
import com.helger.commons.CGlobal;
26+
import com.helger.commons.concurrent.ThreadHelper;
2527
import com.helger.commons.io.resource.ClassPathResource;
2628
import com.helger.phase4.AS4TestConstants;
2729
import com.helger.phase4.config.AS4Configuration;
@@ -39,7 +41,8 @@ public final class UserMessageDuplicateTest extends AbstractUserMessageTestSetUp
3941
public void testSendDuplicateMessageOnlyGetOneReceipt () throws Exception
4042
{
4143
final Node aPayload = DOMReader.readXMLDOM (new ClassPathResource (AS4TestConstants.TEST_SOAP_BODY_PAYLOAD_XML));
42-
final Document aDoc = MockMessages.testUserMessageSoapNotSigned (m_eSoapVersion, aPayload, null).getAsSoapDocument (aPayload);
44+
final Document aDoc = MockMessages.testUserMessageSoapNotSigned (m_eSoapVersion, aPayload, null)
45+
.getAsSoapDocument (aPayload);
4346

4447
final HttpEntity aEntity = new HttpXMLEntity (aDoc, m_eSoapVersion.getMimeType ());
4548

@@ -53,7 +56,8 @@ public void testSendDuplicateMessageOnlyGetOneReceipt () throws Exception
5356
public void testSendDuplicateMessageTestDisposalFeature () throws Exception
5457
{
5558
final Node aPayload = DOMReader.readXMLDOM (new ClassPathResource (AS4TestConstants.TEST_SOAP_BODY_PAYLOAD_XML));
56-
final Document aDoc = MockMessages.testUserMessageSoapNotSigned (m_eSoapVersion, aPayload, null).getAsSoapDocument (aPayload);
59+
final Document aDoc = MockMessages.testUserMessageSoapNotSigned (m_eSoapVersion, aPayload, null)
60+
.getAsSoapDocument (aPayload);
5761

5862
final HttpEntity aEntity = new HttpXMLEntity (aDoc, m_eSoapVersion.getMimeType ());
5963

@@ -63,7 +67,8 @@ public void testSendDuplicateMessageTestDisposalFeature () throws Exception
6367
// 60 000 = 1 minute, *2 and + 10000 are a buffer
6468
// test file is configured for 1 minute can take LONGER if configured
6569
// differently
66-
Thread.sleep (AS4Configuration.getIncomingDuplicateDisposalMinutes () * 60000 * 2 + 10000);
70+
ThreadHelper.sleep (AS4Configuration.getIncomingDuplicateDisposalMinutes () * CGlobal.MILLISECONDS_PER_MINUTE * 2 +
71+
10 * CGlobal.MILLISECONDS_PER_SECOND);
6772

6873
sendPlainMessageAndWait (aEntity, true, null);
6974
}

0 commit comments

Comments
 (0)