Uploaded image for project: 'mod-inventory-storage'
  1. mod-inventory-storage
  2. MODINVSTOR-405

Different error messages between embedded and local PostgreSQL cause HRID tests to fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: TBD
    • Resolution: Done
    • Affects Version/s: 18.0.0
    • Fix Version/s: 19.0.0
    • Labels:
    • Template:

      Description

      Sequence overflow happens when running unit tests against a local database several times.

      Consider resetting the sequence when starting the unit tests.

      [INFO]   HoldingsStorageTest.cannotCreateAHoldingsWithHRIDFailure:1551
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_holdings_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_holdings_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      [INFO]   HoldingsStorageTest.cannotPostSynchronousBatchWithHRIDFailure:1751
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_holdings_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_holdings_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      [INFO]   InstanceStorageTest.cannotCreateACollectionOfInstancesWithDuplicatedHRIDs:2274
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 23505), (Message, duplicate key value violates unique constraint \"instance_hrid_idx_unique\"), (Detail, Key (lower(f_unaccent(jsonb ->> 'hrid'::text)))=(in00000001) already exists.), (s, test_tenant_mod_inventory_storage), (t, instance), (n, instance_hrid_idx_unique), (File, nbtinsert.c), (Line, 434), (Routine, _bt_check_unique)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 23505), (Message, duplicate key value violates unique constraint \"instance_hrid_idx_unique\"), (Detail, Key (lower(f_unaccent(jsonb ->> 'hrid'::text)))=(in00000001) already exists.), (s, test_tenant_mod_inventory_storage), (t, instance), (n, instance_hrid_idx_unique), (File, nbtinsert.c), (Line, 534), (Routine, _bt_check_unique)])"
      [INFO]   InstanceStorageTest.cannotCreateACollectionOfInstancesWithHRIDFailure:2310
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_instances_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_instances_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      [INFO]   InstanceStorageTest.cannotCreateInstanceWithHRIDFailure:1917
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_instances_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_instances_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      [INFO]   InstanceStorageTest.cannotPostSynchronousBatchWithHRIDFailure:2136
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_instances_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_instances_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      [INFO]   ItemStorageTest.cannotCreateAnItemWithHRIDFailure:1073
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_items_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_items_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      [INFO]   ItemStorageTest.cannotPostSynchronousBatchWithHRIDFailure:1435
      [INFO] Expected: is "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_items_seq\" (99999999)), (File, sequence.c), (Line, 700), (Routine, nextval_internal)])"
      [INFO]      but: was "ErrorMessage(fields=[(Severity, ERROR), (V, ERROR), (SQLSTATE, 2200H), (Message, nextval: reached maximum value of sequence \"hrid_items_seq\" (99999999)), (File, sequence.c), (Line, 698), (Routine, nextval_internal)])"
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                marcjohnson Marc Johnson
                Reporter:
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases