【优化】mj 测试增加 WssNotify

This commit is contained in:
cherishsince 2024-04-29 14:53:00 +08:00
parent 59a289f18e
commit 01552d30a6
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}