Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@

package modelengine.fit.jober.aipp.service.impl;

import modelengine.fit.jane.common.entity.OperationContext;
import modelengine.fit.jober.aipp.dto.check.AppCheckDto;
import modelengine.fit.jober.aipp.dto.check.CheckResult;

import modelengine.fitframework.annotation.Component;

import java.util.List;

/**
* 普通检索节点的checker
*
Expand All @@ -22,8 +16,4 @@
*/
@Component
public class RetrievalNodeChecker extends AbstractNodeChecker {
@Override
public List<CheckResult> validate(AppCheckDto appCheckDto, OperationContext context) {
return this.invalidNodeConfig(appCheckDto, appCheckDto.getType());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,7 @@ void testModelNode() {
mockedStatic.when(() -> CheckerFactory.getChecker(anyString())).thenReturn(new RetrievalNodeChecker());
List<CheckResult> results =
this.appBuilderAppService.checkAvailable(Collections.singletonList(appCheckDto), null);
Assertions.assertFalse(results.get(0).isValid());
Assertions.assertEquals(results.get(0).getConfigChecks().size(), 2);
Assertions.assertTrue(results.isEmpty());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ public void testRetrievalNode() {
+ "\"createdAt\":\"2024-12-02 12:41:14\",\"checked\":true}]}]}";
AppCheckDto appCheckDto = JsonUtils.parseObject(testNode, AppCheckDto.class);
List<CheckResult> results = this.retrievalNodeChecker.validate(appCheckDto, null);
Assertions.assertEquals(results.size(), 2);
Assertions.assertFalse(results.get(0).isValid());
Assertions.assertEquals(results.get(0).getConfigChecks().size(), 2);
Assertions.assertFalse(results.get(1).isValid());
Assertions.assertEquals(results.get(1).getConfigChecks().size(), 1);
Assertions.assertTrue(results.isEmpty());
}
}

Expand Down