test(managed-agent): register a Clock bean in the artifact API fixture context

ManagedAgentService.configureRenameDelivery is an @Autowired setter that takes
ManagedAgentProperties and a Clock. The mini context built by
ManagedArtifactApiIntegrationTest.configureApi registered the properties bean
but no Clock, so context.refresh() failed with UnsatisfiedDependency and errored
all 26 artifact integration tests (ManagedArtifactApiIntegrationTest, plus
ManagedArtifactReadIntegrationTest which reuses the same fixture through
configureApi()). Production wiring already supplies the bean via
ExecutionConfiguration.managedAgentClock(), so the fixture only has to mirror it.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Patrol-Run: qwen-pr-conflict/jmv0mrk9bgv
This commit is contained in:
jinjing.zzj 2026-10-09 15:47:00 +08:00
parent 61449726ea
commit 9ae0c66234

View file

@ -83,6 +83,7 @@ class ManagedArtifactApiIntegrationTest {
fixture::reader);
context.registerBean(com.alibaba.qwen.code.managedagent.store.ManagedActionStore.class,
() -> mock(com.alibaba.qwen.code.managedagent.store.ManagedActionStore.class));
context.registerBean(java.time.Clock.class, () -> java.time.Clock.systemUTC());
context.registerBean(ManagedAgentService.class, () -> sessions);
context.refresh();
context.close();