0

为了在我们的项目中添加一些新的 ATDD 测试功能(使用 JBehave)。我已经更新了我的 JUnit jar (4.4 -> 4.10),以便我可以使用 SpringAnnotatedEmbedderRunner 类。

由于这样做,我们的许多单元测试都失败了。所有这些都与我们的“内存中”数据库德比有关:

Caused by: ERROR 42X05: Table/View 'FIX_MESSAGE_SEQUENCES' does not exist.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.UpdateNode.bindStatement(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
... 13 more

有谁知道 derby 和 JUnit 4 之间是否存在任何已知的冲突?或者是否有任何解决方法?

Pom条目:

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
        <optional>true</optional>
    </dependency>

    <dependency>
        <groupId>org.apache.derby</groupId>
        <artifactId>derby</artifactId>
        <version>10.9.1.0 </version>
        <scope>test</scope>
    </dependency>
4

0 回答 0