diff --git a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/yaml/YamlEngineTest.java b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/yaml/YamlEngineTest.java index abc69d70efd41..f773d71967ce0 100644 --- a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/yaml/YamlEngineTest.java +++ b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/yaml/YamlEngineTest.java @@ -19,7 +19,7 @@ import org.apache.shardingsphere.infra.util.yaml.fixture.shortcuts.YamlShortcutsConfigurationFixture; import org.junit.jupiter.api.Test; -import org.yaml.snakeyaml.constructor.ConstructorException; +import org.yaml.snakeyaml.composer.ComposerException; import java.io.BufferedReader; import java.io.File; @@ -101,7 +101,7 @@ void assertUnmarshalInvalidYaml() throws IOException { yamlContent.append(line).append(System.lineSeparator()); } } - assertThrows(ConstructorException.class, () -> YamlEngine.unmarshal(yamlContent.toString(), Object.class)); + assertThrows(ComposerException.class, () -> YamlEngine.unmarshal(yamlContent.toString(), Object.class)); } @Test