Skip to content

Flacky integration test #27

@dianabarsan

Description

@dianabarsan

Integration tests sometimes fail with messages similar (but not restricted to):

[2021-04-14T05:51:39.710Z ERROR]:  exiting
      1) should handle documents with \u0000 in it
[2021-04-14T05:51:39.733Z ERROR]:  An unrecoverable error occurred
[2021-04-14T05:51:39.734Z ERROR]:  error: index "couchdb_doc_attachments" does not exist
    at Connection.parseE (/home/runner/work/couch2pg/couch2pg/node_modules/pg/lib/connection.js:539:11)
    at Connection.parseMessage (/home/runner/work/couch2pg/couch2pg/node_modules/pg/lib/connection.js:366:17)
    at Socket.<anonymous> (/home/runner/work/couch2pg/couch2pg/node_modules/pg/lib/connection.js:105:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Other indexes failing can be reported, like couchdb_doc_uuid already existing.
It looks like there's a race condition where the we're not actually waiting for the migrations to run before starting other migrations or starting testing.

I've seen builds fail on node 8 and node 10, so it doesn't seem to be related to node or package versions.

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