Skip to content

Commit a5488d7

Browse files
committed
[test] 验证github action失败原因
1 parent a2e727a commit a5488d7

File tree

1 file changed

+18
-0
lines changed
  • framework/fel/java/services/tool-service/src/test/java/modelengine/fel/tool/support

1 file changed

+18
-0
lines changed

framework/fel/java/services/tool-service/src/test/java/modelengine/fel/tool/support/HttpToolTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ static void setupAll() {
7171

7272
@AfterAll
7373
static void teardownAll() {
74+
System.out.println("Test runtime will be stop.");
7475
TestFitRuntime.INSTANCE.stop();
76+
System.out.println("Test runtime has been stopped.");
7577
}
7678

7779
private static Tool.Info readToolInfo(String fileName) {
@@ -132,11 +134,13 @@ void shouldReturnMap() {
132134

133135
Address address = Address.create("jiangsu", "suzhou", 3205);
134136
Education education = Education.create("QUST", "UCAS");
137+
System.out.println("Test shouldReturnMap, before execute tool");
135138
Map<String, Object> result = cast(tool.execute("Alice",
136139
26,
137140
address,
138141
education,
139142
Stream.of("0123-4567-8888", "0123-4567-9999").collect(Collectors.toList())));
143+
System.out.println("Test shouldReturnMap, after execute tool");
140144
Map<String, Object> addressResult = cast(result.get("address"));
141145
Map<String, Object> educationResult = cast(result.get("education"));
142146
List<String> phoneNumbers = cast(result.get("phoneNumbers"));
@@ -156,7 +160,9 @@ void shouldReturnString() {
156160
Tool.Info info = readToolInfo("string.json");
157161
Tool tool = createTool(info);
158162

163+
System.out.println("Test shouldReturnString, before execute tool");
159164
String result = cast(tool.execute(Stream.of("abc", "def", "ghi").collect(Collectors.toList())));
165+
System.out.println("Test shouldReturnString, after execute tool");
160166
assertThat(result).isEqualTo("abc,def,ghi");
161167
}
162168

@@ -166,7 +172,9 @@ void shouldReturnInteger() {
166172
Tool.Info info = readToolInfo("integer.json");
167173
Tool tool = createTool(info);
168174

175+
System.out.println("Test shouldReturnInteger, before execute tool");
169176
Integer result = cast(tool.execute(Stream.of(1, 2, 3).collect(Collectors.toList())));
177+
System.out.println("Test shouldReturnInteger, after execute tool");
170178
assertThat(result).isEqualTo(6);
171179
}
172180

@@ -176,7 +184,9 @@ void shouldReturnNull() {
176184
Tool.Info info = readToolInfo("void.json");
177185
Tool tool = createTool(info);
178186

187+
System.out.println("Test shouldReturnNull, before execute tool");
179188
Object result = tool.execute();
189+
System.out.println("Test shouldReturnNull, after execute tool");
180190
assertThat(result).isEqualTo(null);
181191
}
182192

@@ -186,7 +196,9 @@ void BasicShouldReturnOk() {
186196
Tool.Info info = readToolInfo("basic-auth.json");
187197
Tool tool = createTool(info);
188198

199+
System.out.println("Test BasicShouldReturnOk, before execute tool");
189200
boolean result = cast(tool.execute("{\"name\":\"testuser\", \"pwd\":\"testpass\"}"));
201+
System.out.println("Test BasicShouldReturnOk, after execute tool");
190202
assertThat(result).isEqualTo(true);
191203
}
192204

@@ -196,7 +208,9 @@ void ApiKeyShouldReturnOk() {
196208
Tool.Info info = readToolInfo("api-key-auth.json");
197209
Tool tool = createTool(info);
198210

211+
System.out.println("Test ApiKeyShouldReturnOk, before execute tool");
199212
boolean result = cast(tool.execute("{\"name\":\"ApiKey\", \"pwd\":\"ApiKeyValue\"}"));
213+
System.out.println("Test ApiKeyShouldReturnOk, after execute tool");
200214
assertThat(result).isEqualTo(true);
201215
}
202216

@@ -206,7 +220,9 @@ void ApiKeyQueryShouldReturnOk() {
206220
Tool.Info info = readToolInfo("api-key-query-auth.json");
207221
Tool tool = createTool(info);
208222

223+
System.out.println("Test ApiKeyQueryShouldReturnOk, before execute tool");
209224
boolean result = cast(tool.execute("{\"name\":\"ApiKey\", \"pwd\":\"ApiKeyValue\"}"));
225+
System.out.println("Test ApiKeyQueryShouldReturnOk, after execute tool");
210226
assertThat(result).isEqualTo(true);
211227
}
212228

@@ -216,7 +232,9 @@ void BearerShouldReturnOk() {
216232
Tool.Info info = readToolInfo("bearer-auth.json");
217233
Tool tool = createTool(info);
218234

235+
System.out.println("Test BearerShouldReturnOk, before execute tool");
219236
boolean result = cast(tool.execute("{\"name\":\"test666666666\", \"pwd\":\"invalid\"}"));
237+
System.out.println("Test BearerShouldReturnOk, after execute tool");
220238
assertThat(result).isEqualTo(true);
221239
}
222240
}

0 commit comments

Comments
 (0)