ChrisSamo632 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1058905623
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##########
@@ -24,51 +24,38 @@ import org.apache.nifi.remote.protocol.CommunicationsSession
import org.apache.nifi.remote.protocol.ServerProtocol
import org.apache.nifi.reporting.BulletinRepository
import org.apache.nifi.util.NiFiProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
+import org.junit.jupiter.api.Disabled
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.BeforeAll
import org.slf4j.Logger
import org.slf4j.LoggerFactory
-@RunWith(JUnit4.class)
-class StandardPublicPortGroovyTest extends GroovyTestCase {
+class StandardPublicPortGroovyTest {
private static final Logger logger =
LoggerFactory.getLogger(StandardPublicPortGroovyTest.class)
- @BeforeClass
+ @BeforeAll
static void setUpOnce() throws Exception {
logger.metaClass.methodMissing = { String name, args ->
logger.info("[${name?.toUpperCase()}] ${(args as List).join(" ")}")
}
}
- @Before
- void setUp() {
-
- }
-
- @After
- void tearDown() {
-
- }
-
private static PublicPort createPublicPort(NiFiProperties niFiProperties) {
Authorizer mockAuthorizer = [:] as Authorizer
BulletinRepository mockBulletinRepository = [:] as BulletinRepository
ProcessScheduler mockProcessScheduler = [registerEvent: { Connectable
worker ->
logger.mock("Registered event for worker: ${worker}")
}] as ProcessScheduler
- StandardPublicPort spp = new StandardPublicPort("id", "name",
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT, mockAuthorizer,
mockBulletinRepository, mockProcessScheduler, false,
niFiProperties.getBoredYieldDuration(), [])
+ StandardPublicPort spp =
+ new StandardPublicPort("id", "name",
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT,
+ mockAuthorizer, mockBulletinRepository,
mockProcessScheduler, false, niFiProperties.getBoredYieldDuration(), [])
logger.info("Created SPP with mocked collaborators: ${spp}")
spp
}
// TODO: Implement test
- @Ignore("Not yet implemented")
+ @Disabled("Not yet implemented")
Review Comment:
Although this test is `Disabled` (does it still need to be?), it's probably
sensible to remove the raw `assert` at the end and replace it with something
like `assertFalse(responses.isEmpty())`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]