Fix test error

This commit is contained in:
Oracle 2026-04-29 17:08:10 +02:00
parent b4867f88d5
commit bc1a7a8952
Signed by: Oracle
SSH key fingerprint: SHA256:x4/RtnjUyuHkdvmwNDsWSfcfF1V5PNr3OpriZqOvCX8
2 changed files with 27 additions and 27 deletions

View file

@ -0,0 +1,27 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="GrazieInspection" enabled="false" level="GRAMMAR_ERROR" enabled_by_default="false" />
<inspection_tool class="GrazieStyle" enabled="false" level="STYLE_SUGGESTION" enabled_by_default="false" />
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="unused" enabled="false" level="WARNING" enabled_by_default="false" checkParameterExcludingHierarchy="false">
<option name="LOCAL_VARIABLE" value="true" />
<option name="FIELD" value="true" />
<option name="METHOD" value="true" />
<option name="CLASS" value="true" />
<option name="PARAMETER" value="true" />
<option name="REPORT_PARAMETER_FOR_PUBLIC_METHODS" value="true" />
<option name="ADD_MAINS_TO_ENTRIES" value="true" />
<option name="ADD_APPLET_TO_ENTRIES" value="true" />
<option name="ADD_SERVLET_TO_ENTRIES" value="true" />
<option name="ADD_NONJAVA_TO_ENTRIES" value="true" />
<option name="selected" value="true" />
<option name="mixinEntryPoint" value="true" />
</inspection_tool>
</profile>
</component>

View file

@ -183,33 +183,6 @@ class SecureChatCompletionTest {
}, "Convenience create should delegate to full create");
}
@Test
@DisplayName("acreate should delegate to create")
void acreate_shouldDelegateToCreate() {
SecureChatCompletion chat = new SecureChatCompletion();
assertThrows(IllegalArgumentException.class,
() -> chat.acreate(null, List.of(Map.of("role", "user", "content", "hi"))));
}
@Test
@DisplayName("acreate convenience should delegate to create")
void acreate_convenience_shouldDelegate() {
SecureChatCompletion chat = new SecureChatCompletion();
assertThrows(ExecutionException.class, () -> {
try {
chat.acreate("gpt-4", List.of(Map.of("role", "user", "content", "hi")));
} catch (RuntimeException e) {
Throwable cause = e.getCause();
if (cause instanceof ExecutionException) {
throw cause;
}
throw new ExecutionException(cause);
}
}, "Convenience acreate should delegate to create");
}
@Test
@Execution(ExecutionMode.SAME_THREAD)
@DisplayName("close should delegate to client close")