-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/imap connector delete message #388
Conversation
…nd MailConnectorTest; removed deprecated methods in AbstractInboxConnector; marked waitForMails and moveMessage as deprecated in AbstractInboxConnector; changed return value of getMessageCount from long to int in AbstractInboxConnector; corrected handling of boolean return value in pDeleteMessage added usage of PROPERTY_MANAGER in MailConnectorTest, ImapMailConnector and POP3MailConnector; collapsed catches in ImapMailConnector; removed Loggable in ImapMailConnector; changed dataProvider return value in MailConnectorTest; added usage of returned boolean from deleteMessage in MailConnectorTests; removed AssertUtils in MailConnectorTest; corrected testT11_deleteAllMessages in MailConnectorTest; added usage of query method from AbstractInboxConnector in waitForMessage in MailConnectorTest;
…/imap-connector-delete-message � Conflicts: � mail-connector/src/test/java/eu/tsystems/mms/tic/testframework/mailconnector/test/MailConnectorTest.java
Please recheck the mail connector docs if there is needed an update. |
@@ -40,8 +41,9 @@ public class EmailQuery { | |||
*/ | |||
private static final String MAX_READ_TRIES_PROPERTY = "MAX_READ_TRIES"; | |||
|
|||
private int retryCount = Integer.parseInt(PropertyManager.getProperty(MAX_READ_TRIES_PROPERTY, "20")); | |||
private long pauseMs = Integer.parseInt(PropertyManager.getProperty(POLLING_TIMER_SECONDS_PROPERTY, "10")) * 1000; | |||
private int retryCount = Integer.parseInt(PROPERTY_MANAGER.getProperty(MAX_READ_TRIES_PROPERTY, "20")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use PROPERTY_MANAGER.getLongProperty(...)
@@ -609,7 +530,8 @@ private boolean pDeleteMessage(final SearchTerm searchTerm, final String folderN | |||
messages = folder.getMessages(); | |||
} | |||
|
|||
log().info("Checking messages from " + getInboxFolder() + " for MessageID:"); | |||
final String logMessageSearchTerm = String.format("Checking messages from '%s' for MessageID: '%s'", getInboxFolder(), searchTerm); | |||
log().info(logMessageSearchTerm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use default logging syntax with {}
, e.g. log().info("Checking messages from {}", getInboxFolder())
...c/main/java/eu/tsystems/mms/tic/testframework/mailconnector/util/AbstractInboxConnector.java
Show resolved
Hide resolved
...or/src/test/java/eu/tsystems/mms/tic/testframework/mailconnector/test/MailConnectorTest.java
Outdated
Show resolved
Hide resolved
marked deleteMessage deprecated in AbstractInboxConnector; corrected reading long property in EmailQuery; added usage of deleteAllMessages() in MailConnectorTest; reworked waitForMessage in MailConnectorTest;
@@ -42,7 +42,7 @@ public class EmailQuery implements PropertyManagerProvider { | |||
private static final String MAX_READ_TRIES_PROPERTY = "MAX_READ_TRIES"; | |||
|
|||
private int retryCount = Integer.parseInt(PROPERTY_MANAGER.getProperty(MAX_READ_TRIES_PROPERTY, "20")); | |||
private long pauseMs = Integer.parseInt(PROPERTY_MANAGER.getProperty(POLLING_TIMER_SECONDS_PROPERTY, "10")) * 1000L; | |||
private long pauseMs = PROPERTY_MANAGER.getLongProperty(POLLING_TIMER_SECONDS_PROPERTY, "10") * 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value should not "10"
, but 10L
Description
Type of change
Please delete options that are not relevant.
Checklist: