#23850: Test failure in migrations tests
----------------------------+--------------------------------------
     Reporter:  jphalip     |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------

Comment (by jphalip):

 It's odd. Adding the following `sleep()` statement allows the tests to
 consistently pass again:

 {{{
 diff --git a/tests/migrations/test_commands.py
 b/tests/migrations/test_commands.py
 index f4e3878..a23f05a 100644
 --- a/tests/migrations/test_commands.py
 +++ b/tests/migrations/test_commands.py
 @@ -519,6 +519,7 @@ class MakeMigrationsTests(MigrationTestBase):
          Makes sure that makemigrations generate a custom migration.
          """
          def cmd(migration_count, migration_name, *args):
 +            from time import sleep; sleep(1)
              with override_settings(MIGRATION_MODULES={"migrations":
 self.migration_pkg}):
                  try:
                      call_command("makemigrations", "migrations", "--
 verbosity", "0", "--name", migration_name, *args)
 }}}

 So this seems like some sort of race condition. It's unclear to me how
 that could be happening though...

--
Ticket URL: <https://code.djangoproject.com/ticket/23850#comment:2>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.c7edb129f7cf196b614b1a1c345a5ef6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to