Skip to content

Fix flaky test: Database: test_ns already exists. #3985

@turboFei

Description

@turboFei
2025-11-29T08:00:54.3432635Z [INFO] Results:
2025-11-29T08:00:54.3433304Z [INFO] 
2025-11-29T08:00:54.3433738Z [ERROR] Failures: 
2025-11-29T08:00:54.3434507Z [ERROR]   TestInternalMixedCatalogService$TestDatabaseOperation.test:168 expected: <true> but was: <false>
2025-11-29T08:00:54.3435377Z [ERROR] Errors: 
2025-11-29T08:00:54.3437400Z [ERROR]   TestInternalMixedCatalogService$CompatibilityCatalogTests.assertHistoricalCatalogCannotLoadNewTable:376 » ServiceFailure Server error: PersistenceException: org.apache.ibatis.exceptions.PersistenceException: 
2025-11-29T08:00:54.3441306Z ### Error updating database.  Cause: org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL251129080039620' defined on 'TABLE_RUNTIME'.
2025-11-29T08:00:54.3443723Z ### The error may exist in org/apache/amoro/server/persistence/mapper/TableRuntimeMapper.java (best guess)
2025-11-29T08:00:54.3444991Z ### The error may involve org.apache.amoro.server.persistence.mapper.TableRuntimeMapper.insertRuntime-Inline
2025-11-29T08:00:54.3445920Z ### The error occurred while setting parameters
2025-11-29T08:00:54.3446798Z ### SQL: INSERT INTO table_runtime (table_id, group_name, status_code, table_config, table_summary, bucket_id) VALUES (?, ?, ?, ?, ?, ?)
2025-11-29T08:00:54.3449544Z ### Cause: org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL251129080039620' defined on 'TABLE_RUNTIME'.
2025-11-29T08:00:54.3452147Z [ERROR]   TestInternalMixedCatalogService$CompatibilityCatalogTests.setupTest:310 » AlreadyExists Database already exists, test_ns
2025-11-29T08:00:54.3453351Z [ERROR]   TestInternalMixedCatalogService$CompatibilityCatalogTests.setupTest:310 » AlreadyExists Database already exists, test_ns
2025-11-29T08:00:54.3454233Z [ERROR]   TestInternalMixedCatalogService$TestTableCommit.before:247 » AlreadyExists Database: test_ns already exists.
2025-11-29T08:00:54.3455215Z [ERROR]   TestInternalMixedCatalogService$TestTableCommit.before:247 » AlreadyExists Database: test_ns already exists.
2025-11-29T08:00:54.3456044Z [ERROR]   TestInternalMixedCatalogService$TestTableOperation.before:186 » AlreadyExists Database: test_ns already exists.
2025-11-29T08:00:54.3456888Z [ERROR]   TestInternalMixedCatalogService$TestTableOperation.before:186 » AlreadyExists Database: test_ns already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions