TestPartitionTable.test_delete_renumbers_others flaky test

Bug #2028053 reported by Jacopo Rota
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Incomplete
Medium
Unassigned

Bug Description

TestPartitionTable.test_delete_renumbers_others

Traceback (most recent call last):
testtools.testresult.real._StringException: Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  Twisted logs

Seeds: {{{MAAS_RAND_SEED=3a25267e03047569 PYTHONHASHSEED=1568515762}}}

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "maasserver_partition_partition_table_id_index_281198d5_uniq"
DETAIL: Key (partition_table_id, index)=(418, 2) already exists.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/run/build/checkout/src/maasserver/models/tests/test_partitiontable.py", line 163, in test_delete_renumbers_others
    partition_table.delete_partition(p1)
  File "/run/build/checkout/src/maasserver/models/partitiontable.py", line 144, in delete_partition
    self.partitions.filter(index__gt=index).update(index=F("index") - 1)
  File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 741, in update
    rows = query.get_compiler(self.db).execute_sql(CURSOR)
  File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1469, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1140, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 99, in execute
    return super().execute(sql, params)
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: duplicate key value violates unique constraint "maasserver_partition_partition_table_id_index_281198d5_uniq"
DETAIL: Key (partition_table_id, index)=(418, 2) already exists.

http://maas-ci.internal:8080/job/maas-tester/3074/testReport/maasserver.models.tests.test_partitiontable/TestPartitionTable/test_delete_renumbers_others/

Tags: flaky-test
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

Occurred only once, setting to incomplete waiting for more occurrences

Changed in maas:
importance: Undecided → Medium
milestone: none → 3.5.0
status: Triaged → Incomplete
Changed in maas:
milestone: 3.5.0 → 3.5.x
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.