Migration test fails randomly

Description

Migration test job fails randomly on the Jenkins with the following error:

2019-01-18T14:27:59+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.metadatatable.MetaDataTableImpl Creating Metadata table: "cce"."schema_version"
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Current version of schema "cce": 0
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170703115656512 - initial schema
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170720141040004 - create table cce inventory
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170724142909374 - add primary keys
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170801113005321 - inventory changed column name
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170804085432312 - add serial number and reference name
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170807102040174 - add archived column to cce catalog
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170810170921962 - add decommission date and rtm and remove serial number
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170811072301442 - remove unique id
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170811110808422 - fix cce db issues
2019-01-18T14:28:00+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170818132535841 - remove barcode from inventory item
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170821083234152 - remove requiresAttention from inventory item
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20170913173534345 - add unique constraints to catalog items
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20171114101548905 - add index for facilityId and programId fields in inventory item
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20171114110706846 - add index for catalogItemId in inventory item
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20171120102801224 - add columns to inventoryitem
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20171128174204892 - drop columns from inventoryitem
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Migrating schema "cce" to version 20180216055219230 - create cce alerts
2019-01-18T14:28:01+00:00 51ebf65b63bf [ main] INFO org.flywaydb.core.internal.command.DbMigrate Successfully applied 17 migrations to schema "cce" (execution time 00:01.706s).
2019-01-18T14:28:01+00:00 51ebf65b63bf cce [ main] INFO org.openlmis.cce.ExportSchemaFlywayCallback After migrations, exporting db schema
2019-01-18T14:28:01+00:00 51ebf65b63bf cce [ main] WARN org.openlmis.cce.ExportSchemaFlywayCallback Exporting db schema failed with message: java.io.IOException: Cannot run program "/app/export_schema.sh": error=2, No such file or directory
2019-01-18T14:28:15+00:00 51ebf65b63bf [ main] ERROR org.springframework.beans.factory.support.DefaultListableBeanFactory Destroy method on bean with name 'dataSourceInitializer' threw an exception
2019-01-18T14:28:15+00:00 51ebf65b63bf #011java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@f2a0b8e: startup date [Fri Jan 18 14:27:20 GMT 2019]; root of context hierarchy
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [dismissTimestamp] in table [cce_alerts]

Acceptance Criteria:

  • migration test job works properly

Environment

None

Status

Assignee

Łukasz Lewczyński

Reporter

Klaudia Pałkowska

Labels

Story Points

5

Time tracking

24h

Components

Sprint

None

Priority

Major
Configure