#30105: Fix django test running ordering for partial unique constraint
------------------------------------------+------------------------
               Reporter:  Pavel Tyslacki  |          Owner:  nobody
                   Type:  Uncategorized   |         Status:  new
              Component:  Uncategorized   |        Version:  2.1
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  1
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+------------------------
 Bug com from #30062:

 {{{
  ./tests/runtests.py migrations --parallel=1 --reverse --failfast
 ...
 ======================================================================
 ERROR: test_create_model_with_partial_unique_constraint
 (migrations.test_operations.OperationTests)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/tim/code/django/django/db/backends/utils.py", line 84, in
 _execute
     return self.cursor.execute(sql, params)
   File "/home/tim/code/django/django/db/backends/sqlite3/base.py", line
 376, in execute
     return Database.Cursor.execute(self, query, params)
 sqlite3.OperationalError: index
 test_constraint_pony_pink_for_weight_gt_5_uniq already exists

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

 Traceback (most recent call last):
   File "/home/tim/code/django/tests/migrations/test_operations.py", line
 527, in test_create_model_with_partial_unique_constraint
     operation.database_forwards('test_crmo', editor, project_state,
 new_state)
   File "/home/tim/code/django/django/db/backends/sqlite3/schema.py", line
 35, in __exit__
     super().__exit__(exc_type, exc_value, traceback)
   File "/home/tim/code/django/django/db/backends/base/schema.py", line
 110, in __exit__
     self.execute(sql)
   File "/home/tim/code/django/django/db/backends/base/schema.py", line
 137, in execute
     cursor.execute(sql, params)
   File "/home/tim/code/django/django/db/backends/utils.py", line 67, in
 execute
     return self._execute_with_wrappers(sql, params, many=False,
 executor=self._execute)
   File "/home/tim/code/django/django/db/backends/utils.py", line 76, in
 _execute_with_wrappers
     return executor(sql, params, many, context)
   File "/home/tim/code/django/django/db/backends/utils.py", line 84, in
 _execute
     return self.cursor.execute(sql, params)
   File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
     raise dj_exc_value.with_traceback(traceback) from exc_value
   File "/home/tim/code/django/django/db/backends/utils.py", line 84, in
 _execute
     return self.cursor.execute(sql, params)
   File "/home/tim/code/django/django/db/backends/sqlite3/base.py", line
 376, in execute
     return Database.Cursor.execute(self, query, params)
 django.db.utils.OperationalError: index
 test_constraint_pony_pink_for_weight_gt_5_uniq already exists

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30105>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.9c4e787882e5cb03c96ab427eeed4367%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to