mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed testcase compiler error
This commit is contained in:
@@ -104,4 +104,8 @@ public class CanalServerWithNetty extends AbstractCanalLifeCycle implements Cana
|
|||||||
this.port = port;
|
this.port = port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEmbeddedServer(CanalServerWithEmbedded embeddedServer) {
|
||||||
|
this.embeddedServer = embeddedServer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class CanalServerWithNettyTest {
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
CanalServerWithEmbedded embeddedServer = CanalServerWithEmbedded.instance();
|
CanalServerWithEmbedded embeddedServer = new CanalServerWithEmbedded();
|
||||||
embeddedServer.setCanalInstanceGenerator(new CanalInstanceGenerator() {
|
embeddedServer.setCanalInstanceGenerator(new CanalInstanceGenerator() {
|
||||||
|
|
||||||
public CanalInstance generate(String destination) {
|
public CanalInstance generate(String destination) {
|
||||||
@@ -58,7 +58,8 @@ public class CanalServerWithNettyTest {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
nettyServer = new CanalServerWithNetty(embeddedServer);
|
nettyServer = CanalServerWithNetty.instance();
|
||||||
|
nettyServer.setEmbeddedServer(embeddedServer);
|
||||||
nettyServer.setPort(1088);
|
nettyServer.setPort(1088);
|
||||||
nettyServer.start();
|
nettyServer.start();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user