parent
b8a713fde3
commit
3be1216897
|
@ -135,7 +135,7 @@ public abstract class YamlProcessor {
|
||||||
* <p>If no supported types are configured, only Java standard classes
|
* <p>If no supported types are configured, only Java standard classes
|
||||||
* (as defined in {@link org.yaml.snakeyaml.constructor.SafeConstructor})
|
* (as defined in {@link org.yaml.snakeyaml.constructor.SafeConstructor})
|
||||||
* encountered in YAML documents will be supported.
|
* encountered in YAML documents will be supported.
|
||||||
* If an unsupported type is encountered, an {@link ComposerException}
|
* If an unsupported type is encountered, a {@link ComposerException}
|
||||||
* will be thrown when the corresponding YAML node is processed.
|
* will be thrown when the corresponding YAML node is processed.
|
||||||
* @param supportedTypes the supported types, or an empty array to clear the
|
* @param supportedTypes the supported types, or an empty array to clear the
|
||||||
* supported types
|
* supported types
|
||||||
|
@ -180,7 +180,7 @@ public abstract class YamlProcessor {
|
||||||
* <p>If custom {@linkplain #setSupportedTypes supported types} have been configured,
|
* <p>If custom {@linkplain #setSupportedTypes supported types} have been configured,
|
||||||
* the default implementation creates a {@code Yaml} instance that filters out
|
* the default implementation creates a {@code Yaml} instance that filters out
|
||||||
* unsupported types encountered in YAML documents.
|
* unsupported types encountered in YAML documents.
|
||||||
* If an unsupported type is encountered, an {@link ComposerException} will be
|
* If an unsupported type is encountered, a {@link ComposerException} will be
|
||||||
* thrown when the node is processed.
|
* thrown when the node is processed.
|
||||||
* @see LoaderOptions#setAllowDuplicateKeys(boolean)
|
* @see LoaderOptions#setAllowDuplicateKeys(boolean)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -36,7 +36,7 @@ class VirtualThreadTaskExecutorTests {
|
||||||
executeAndWait(executor, task, monitor);
|
executeAndWait(executor, task, monitor);
|
||||||
assertThat(task.getThreadName()).isEmpty();
|
assertThat(task.getThreadName()).isEmpty();
|
||||||
assertThat(task.isVirtual()).isTrue();
|
assertThat(task.isVirtual()).isTrue();
|
||||||
assertThat(task.runtCount()).isOne();
|
assertThat(task.runCount()).isOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -47,7 +47,7 @@ class VirtualThreadTaskExecutorTests {
|
||||||
executeAndWait(executor, task, monitor);
|
executeAndWait(executor, task, monitor);
|
||||||
assertThat(task.getThreadName()).isEqualTo("test-0");
|
assertThat(task.getThreadName()).isEqualTo("test-0");
|
||||||
assertThat(task.isVirtual()).isTrue();
|
assertThat(task.isVirtual()).isTrue();
|
||||||
assertThat(task.runtCount()).isOne();
|
assertThat(task.runCount()).isOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -58,7 +58,7 @@ class VirtualThreadTaskExecutorTests {
|
||||||
executeAndWait(executor, task, monitor);
|
executeAndWait(executor, task, monitor);
|
||||||
assertThat(task.getThreadName()).isEqualTo("test");
|
assertThat(task.getThreadName()).isEqualTo("test");
|
||||||
assertThat(task.isVirtual()).isTrue();
|
assertThat(task.isVirtual()).isTrue();
|
||||||
assertThat(task.runtCount()).isOne();
|
assertThat(task.runCount()).isOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -71,7 +71,7 @@ class VirtualThreadTaskExecutorTests {
|
||||||
executeAndWait(executor, task, monitor);
|
executeAndWait(executor, task, monitor);
|
||||||
assertThat(task.getThreadName()).startsWith(customPrefix);
|
assertThat(task.getThreadName()).startsWith(customPrefix);
|
||||||
assertThat(task.isVirtual()).isTrue();
|
assertThat(task.isVirtual()).isTrue();
|
||||||
assertThat(task.runtCount()).isOne();
|
assertThat(task.runCount()).isOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeAndWait(TaskExecutor executor, Runnable task, Object monitor) {
|
private void executeAndWait(TaskExecutor executor, Runnable task, Object monitor) {
|
||||||
|
@ -139,7 +139,7 @@ class VirtualThreadTaskExecutorTests {
|
||||||
return this.virtual;
|
return this.virtual;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int runtCount() {
|
public int runCount() {
|
||||||
return this.runCount.get();
|
return this.runCount.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue