working on net mail test
This commit is contained in:
parent
d19e058178
commit
a42062479a
7 changed files with 21 additions and 10 deletions
|
@ -18,7 +18,8 @@ test {
|
||||||
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
|
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
|
||||||
'--add-opens=java.base/java.io=ALL-UNNAMED',
|
'--add-opens=java.base/java.io=ALL-UNNAMED',
|
||||||
'--add-opens=java.base/java.nio=ALL-UNNAMED',
|
'--add-opens=java.base/java.nio=ALL-UNNAMED',
|
||||||
'--add-opens=java.base/java.util=ALL-UNNAMED'
|
'--add-opens=java.base/java.util=ALL-UNNAMED',
|
||||||
|
'--add-opens=java.base/sun.security.util=ALL-UNNAMED'
|
||||||
systemProperty 'java.util.logging.config.file', 'src/test/resources/logging.properties'
|
systemProperty 'java.util.logging.config.file', 'src/test/resources/logging.properties'
|
||||||
environment 'NOTIFY_SOCKET', '/run/systemd/notify'
|
environment 'NOTIFY_SOCKET', '/run/systemd/notify'
|
||||||
testLogging {
|
testLogging {
|
||||||
|
|
|
@ -1133,9 +1133,7 @@ public final class Session {
|
||||||
currLine);
|
currLine);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Provider provider = new Provider(type, protocol, className,
|
Provider provider = new Provider(type, protocol, className, vendor, version);
|
||||||
vendor, version);
|
|
||||||
|
|
||||||
// add the newly-created Provider to the lookup tables
|
// add the newly-created Provider to the lookup tables
|
||||||
addProvider(provider);
|
addProvider(provider);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MimeMultipartParseTest {
|
public class MimeMultipartParseTest {
|
||||||
private static Session session =
|
private static final Session session =
|
||||||
Session.getInstance(new Properties(), null);
|
Session.getInstance(new Properties(), null);
|
||||||
|
|
||||||
private static final int maxsize = 10000;
|
private static final int maxsize = 10000;
|
||||||
|
@ -63,7 +63,7 @@ public class MimeMultipartParseTest {
|
||||||
* although it still takes about 30 seconds, which is on the long side
|
* although it still takes about 30 seconds, which is on the long side
|
||||||
* for a unit test.
|
* for a unit test.
|
||||||
*/
|
*/
|
||||||
public void test(boolean shared) throws Exception {
|
private void test(boolean shared) throws Exception {
|
||||||
testMessage(1, shared);
|
testMessage(1, shared);
|
||||||
testMessage(2, shared);
|
testMessage(2, shared);
|
||||||
testMessage(62, shared);
|
testMessage(62, shared);
|
||||||
|
@ -73,11 +73,12 @@ public class MimeMultipartParseTest {
|
||||||
testMessage(1023, shared);
|
testMessage(1023, shared);
|
||||||
testMessage(1024, shared);
|
testMessage(1024, shared);
|
||||||
testMessage(1025, shared);
|
testMessage(1025, shared);
|
||||||
for (int size = 8100; size <= maxsize; size++)
|
for (int size = 8100; size <= maxsize; size++) {
|
||||||
testMessage(size, shared);
|
testMessage(size, shared);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void testMessage(int size, boolean shared) throws Exception {
|
private void testMessage(int size, boolean shared) throws Exception {
|
||||||
//System.out.println("SIZE: " + size);
|
//System.out.println("SIZE: " + size);
|
||||||
/*
|
/*
|
||||||
* Construct a multipart message with a part of the
|
* Construct a multipart message with a part of the
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
protocol=imap; type=store; class=org.xbib.net.mail.imap.IMAPStore; vendor=xbib;
|
||||||
|
protocol=imaps; type=store; class=org.xbib.net.mail.imap.IMAPSSLStore; vendor=xbib;
|
||||||
|
protocol=pop3; type=store; class=org.xbib.net.mail.pop3.POP3Store; vendor=xbib;
|
||||||
|
protocol=pop3s; type=store; class=org.xbib.net.mail.pop3.POP3SSLStore; vendor=xbib;
|
||||||
|
protocol=smtp; type=transport; class=org.xbib.net.mail.smtp.SMTPTransport; vendor=xbib;
|
||||||
|
protocol=smtps; type=transport; class=org.xbib.net.mail.smtp.SMTPSSLTransport; vendor=xbib;
|
|
@ -0,0 +1,4 @@
|
||||||
|
org.xbib.net.mail.pop3.POP3Provider
|
||||||
|
org.xbib.net.mail.pop3.POP3SSLProvider
|
||||||
|
org.xbib.net.mail.smtp.SMTPProvider
|
||||||
|
org.xbib.net.mail.smtp.SMTPSSLProvider
|
|
@ -0,0 +1 @@
|
||||||
|
org.xbib.net.mail.util.MailStreamProvider
|
|
@ -1,4 +1,4 @@
|
||||||
handlers=java.util.logging.ConsoleHandler
|
handlers=java.util.logging.ConsoleHandler
|
||||||
.level=ALL
|
.level=INFO
|
||||||
java.util.logging.ConsoleHandler.level=ALL
|
java.util.logging.ConsoleHandler.level=INFO
|
||||||
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
|
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
|
||||||
|
|
Loading…
Reference in a new issue