Actually, in 1.7.x both should work. Ilya: Can you test if using TEST_MIRROR fixes the issue you are seeing? On Oct 26, 2014 9:19 AM, "Tom Evans" <[email protected]> wrote:
> On Sat, Oct 25, 2014 at 5:21 PM, Ilya Baryshev <[email protected]> wrote: > > Hey all! > > > > I was writing tests for queries that use replica database, so I tried > using > > TEST_MIRROR setting. > > TEST_MIRROR promises "connection to slave will be redirected to point at > > default. > > As a result, writes to default will appear on slave". Which happens not > to > > be the case for me, > > replica queries are not returning expected results. > > > > Is this a bug, or am I missing something? > > > > Here is my example settings: > > > > DATABASES = { > > 'default': { > > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > > 'NAME': 'testmirror', > > 'HOST': '127.0.0.1', > > 'PORT': 5432, > > }, > > 'slave': { > > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > > 'NAME': 'testmirror2', > > 'HOST': '127.0.0.1', > > 'PORT': 5432, > > 'TEST': { > > 'MIRROR': 'default' > > This should be 'TEST_MIRROR': 'default' > > Cheers > > Tom > > -- > You received this message because you are subscribed to the Google Groups > "Django users" 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]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAFHbX1L%3DU95K4_XreTm%3D2aET3JRPCCeQL1773wgRZ_25eJX7gQ%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" 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]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAO7PdF8F6d3rqYHJ5hj7Rfkom8%3DeHv7h1TTbpkSack1ATjg8Lg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

