【优化】mj 测试增加 WssNotify
This commit is contained in:
parent
59a289f18e
commit
01552d30a6
|
@ -1,6 +1,7 @@
|
|||
package cn.iocoder.yudao.framework.ai.midjourney;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.iocoder.yudao.framework.ai.midjourney.webSocket.WssNotify;
|
||||
import cn.iocoder.yudao.framework.ai.midjourney.webSocket.listener.MidjourneyMessageListener;
|
||||
import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter;
|
||||
import org.junit.Before;
|
||||
|
@ -38,7 +39,12 @@ public class MidjourneyWebSocketTests {
|
|||
var webSocketStarter = new MidjourneyWebSocketStarter(wssUrl, null, midjourneyConfig, messageListener);
|
||||
|
||||
try {
|
||||
webSocketStarter.start();
|
||||
webSocketStarter.start(new WssNotify() {
|
||||
@Override
|
||||
public void notify(int code, String message) {
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue