mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 17:40:05 +08:00
【优化】mj 测试增加 WssNotify
This commit is contained in:
parent
59a289f18e
commit
01552d30a6
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.framework.ai.midjourney;
|
package cn.iocoder.yudao.framework.ai.midjourney;
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
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.listener.MidjourneyMessageListener;
|
||||||
import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter;
|
import cn.iocoder.yudao.framework.ai.midjourney.webSocket.MidjourneyWebSocketStarter;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@ -38,7 +39,12 @@ public class MidjourneyWebSocketTests {
|
|||||||
var webSocketStarter = new MidjourneyWebSocketStarter(wssUrl, null, midjourneyConfig, messageListener);
|
var webSocketStarter = new MidjourneyWebSocketStarter(wssUrl, null, midjourneyConfig, messageListener);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
webSocketStarter.start();
|
webSocketStarter.start(new WssNotify() {
|
||||||
|
@Override
|
||||||
|
public void notify(int code, String message) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user