[ 
https://issues.apache.org/jira/browse/JAMES-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17256773#comment-17256773
 ] 

ASF GitHub Bot commented on JAMES-2543:
---------------------------------------

chibenwa commented on a change in pull request #283:
URL: https://github.com/apache/james-project/pull/283#discussion_r550371029



##########
File path: 
mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/resources/imapserver.xml
##########
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>

Review comment:
       My bet is that we don't need IMAP, LMTP, POP3, etc... while testing 
SMTP. Maybe we can omit unneeded files?

##########
File path: 
mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/InMemoryDnsExtension.java
##########
@@ -0,0 +1,60 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mpt.smtp;
+
+import java.util.Optional;
+
+import org.apache.james.GuiceModuleTestExtension;
+import org.apache.james.dnsservice.api.DNSService;
+import org.apache.james.dnsservice.api.InMemoryDNSService;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ParameterContext;
+import org.junit.jupiter.api.extension.ParameterResolutionException;
+
+import com.google.inject.Module;
+
+public class InMemoryDnsExtension implements GuiceModuleTestExtension {
+    private InMemoryDNSService inMemoryDns;
+
+    @Override
+    public Module getModule() {
+        return binder -> binder.bind(DNSService.class).toInstance(inMemoryDns);
+    }
+
+    @Override
+    public void afterEach(ExtensionContext extensionContext) throws Exception {
+        inMemoryDns = null;

Review comment:
       Is this needed?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> remove usage of junit 4
> -----------------------
>
>                 Key: JAMES-2543
>                 URL: https://issues.apache.org/jira/browse/JAMES-2543
>             Project: James Server
>          Issue Type: Task
>          Components: tests
>    Affects Versions: 3.1.0
>            Reporter: Matthieu Baechler
>            Priority: Major
>
> Now that Junit 5 is working well, we should migrate our test code to it to 
> benefits from great new features.
> For that, as Junit 5 assertions changed from junit 4 ones, the easiest path 
> is to migrate all assertions to assertj (because they are better anyway).
> A second step will be to migrate from @Rule to extensions.
> Then there will probably the need to use cucumber for junit5 integration.
> This ticket will track the progress on this task



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to