From 5d5b9fe63d6d416bf21969bd1c27c1e1a754a2d3 Mon Sep 17 00:00:00 2001 From: Pat Buxton Date: Mon, 16 Apr 2018 10:06:13 -0400 Subject: [PATCH] Fix - Order of records is not guaranteed * Causes intermittent failure against Greenplum cluster * Tested using Greenplum dialact: https://github.com/PlaidCloud/sqlalchemy-greenplum Change-Id: I6387e98f17a3667612fdaaadb27a08f79ec46398 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/440 --- lib/sqlalchemy/testing/suite/test_results.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sqlalchemy/testing/suite/test_results.py b/lib/sqlalchemy/testing/suite/test_results.py index c00e046573..f464d47ebd 100644 --- a/lib/sqlalchemy/testing/suite/test_results.py +++ b/lib/sqlalchemy/testing/suite/test_results.py @@ -355,13 +355,13 @@ class ServerSideCursorsTest(fixtures.TestBase, testing.AssertsExecutionResults): test_table.create(checkfirst=True) test_table.insert().execute(data='data1') test_table.insert().execute(data='data2') - eq_(test_table.select().execute().fetchall(), [(1, 'data1' - ), (2, 'data2')]) + eq_(test_table.select().order_by(test_table.c.id).execute().fetchall(), + [(1, 'data1'), (2, 'data2')]) test_table.update().where( test_table.c.id == 2).values( data=test_table.c.data + ' updated').execute() - eq_(test_table.select().execute().fetchall(), + eq_(test_table.select().order_by(test_table.c.id).execute().fetchall(), [(1, 'data1'), (2, 'data2 updated')]) test_table.delete().execute() eq_(select([func.count('*')]).select_from(test_table).scalar(), 0) -- 2.47.2