Skip to content

Commit 3d132e8

Browse files
committed
fix unit tests
Change-Id: If50310eb6e37c51d5b32de021f0a825c0bf2457f
1 parent 5275333 commit 3d132e8

File tree

14 files changed

+23
-148
lines changed

14 files changed

+23
-148
lines changed

core/src/test/java/io/agentscope/runtime/sandbox/manager/ContainerPoolTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ void testCreateSandboxManagerWithPool() {
8888

8989
// Create manager - this will automatically initialize the pool
9090
manager = new SandboxManager(config);
91+
manager.start();
9192

9293
assertNotNull(manager, "SandboxManager should be created successfully");
9394

@@ -113,6 +114,7 @@ void testPoolBehaviorWithDifferentTypes() {
113114
.build();
114115

115116
manager = new SandboxManager(config);
117+
manager.start();
116118
assertNotNull(manager, "SandboxManager should be created successfully");
117119

118120
// Define sessionIDs
@@ -167,6 +169,7 @@ void testPortManagementAcrossMultipleCreations() {
167169
.build();
168170

169171
manager = new SandboxManager(config);
172+
manager.start();
170173
assertNotNull(manager, "SandboxManager should be created successfully");
171174

172175
// Define sessionIDs

core/src/test/java/io/agentscope/runtime/sandbox/manager/DockerLifecycleTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ void setUp() {
5454
.containerDeployment(clientConfig)
5555
.build();
5656
sandboxManager = new SandboxManager(config);
57+
sandboxManager.start();
5758
System.out.println("Docker SandboxManager initialized successfully");
5859
} catch (Exception e) {
5960
System.err.println("Failed to initialize Docker SandboxManager: " + e.getMessage());

core/src/test/java/io/agentscope/runtime/sandbox/manager/LocalFileSystemTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ void testLocalFileSystemIntegration() {
115115

116116
// 4. Create SandboxManager
117117
manager = new SandboxManager(config);
118+
manager.start();
118119
System.out.println("\nSandboxManager with local file system storage created successfully");
119120

120121
// 5. Create container (will copy data from local storage)

core/src/test/java/io/agentscope/runtime/sandbox/manager/RedisSandboxManagerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public void testSandboxManagerWithRedis() {
7777
.build();
7878

7979
try (SandboxManager manager = new SandboxManager(config)) {
80+
manager.start();
8081
assertNotNull(manager, "SandboxManager should be initialized");
8182

8283
ContainerModel container = manager.getSandbox(

core/src/test/java/io/agentscope/runtime/sandbox/tools/BaseToolsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ void setUp() {
4040
.containerDeployment(clientConfig)
4141
.build();
4242
sandboxManager = new SandboxManager(config);
43+
sandboxManager.start();
4344
sandbox = new BaseSandbox(sandboxManager, "test-user", "test-session");
4445
System.out.println("SandboxManager initialized successfully");
4546
} catch (Exception e) {

core/src/test/java/io/agentscope/runtime/sandbox/tools/BrowserInteractiveToolsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void setUp() {
4444
.containerDeployment(clientConfig)
4545
.build();
4646
sandboxManager = new SandboxManager(config);
47+
sandboxManager.start();
4748
sandbox = new BrowserSandbox(sandboxManager, "test-user", "test-session");
4849
System.out.println("SandboxManager initialized successfully");
4950
} catch (Exception e) {

core/src/test/java/io/agentscope/runtime/sandbox/tools/BrowserToolsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ void setUp() {
4141
.containerDeployment(clientConfig)
4242
.build();
4343
sandboxManager = new SandboxManager(config);
44+
sandboxManager.start();
4445
sandbox = new BrowserSandbox(sandboxManager, "test-user", "test-session");
4546
System.out.println("SandboxManager initialized successfully");
4647
} catch (Exception e) {

core/src/test/java/io/agentscope/runtime/sandbox/tools/FilesystemToolsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ void setUp() {
4040
.containerDeployment(clientConfig)
4141
.build();
4242
sandboxManager = new SandboxManager(config);
43+
sandboxManager.start();
4344
sandbox = new FilesystemSandbox(sandboxManager, "test-user", "test-session");
4445
System.out.println("SandboxManager initialized successfully");
4546
} catch (Exception e) {

examples/simple_agent_use_examples/agentscope_use_example/src/main/java/io/agentscope/ExampleTool.java

Lines changed: 0 additions & 135 deletions
This file was deleted.

starters/spring-boot-starter-runtime-a2a/src/main/java/io/agentscope/runtime/autoconfigure/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2024-2025 the original author or authors.
2+
* Copyright 2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

0 commit comments

Comments
 (0)