summaryrefslogtreecommitdiff
path: root/test/engine/test_reconnect.py
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed bug in :class:`.Connection` and pool where theMike Bayer2015-02-041-0/+10
| | | | | | | | | :meth:`.Connection.invalidate` method, or an invalidation due to a database disconnect, would fail if the ``isolation_level`` parameter had been used with :meth:`.Connection.execution_options`; the "finalizer" that resets the isolation level would be called on the no longer opened connection. fixes #3302
* - simplify the "noconnection" error handling, settingMike Bayer2014-12-081-2/+2
| | | | | | | _handle_dbapi_exception_noconnection() to only invoke in the case of raw_connection() in the constructor of Connection. in all other cases the Connection proceeds with _handle_dbapi_exception() including revalidate.
* - adjust _revalidate_connection() again such that we pass a _wrap=FalseMike Bayer2014-12-051-2/+2
| | | | | | | | | | to it, so that we say we will do the wrapping just once right here in _execute_context() / _execute_default(). An adjustment is made to _handle_dbapi_error() to not assume self.__connection in case we are already in an invalidated state further adjustment to 0639c199a547343d62134d2f233225fd2862ec45, 41e7253dee168b8c26c49, #3266
* - Fixed bug where a "branched" connection, that is the kind you getMike Bayer2014-09-261-10/+26
| | | | | | | | when you call :meth:`.Connection.connect`, would not share transaction status with the parent. The architecture of branching has been tweaked a bit so that the branched connection defers to the parent for all transactional status and operations. fixes #3190
* - Fixed bug where a "branched" connection, that is the kind you getMike Bayer2014-09-261-0/+32
| | | | | | | | when you call :meth:`.Connection.connect`, would not share invalidation status with the parent. The architecture of branching has been tweaked a bit so that the branched connection defers to the parent for all invalidation status and operations. fixes #3215
* PEP8 tidy of test/engine/test_reconnectTony Locke2014-08-021-58/+52
|
* - more pg8000 tests passingMike Bayer2014-07-251-1/+2
|
* - vastly improve the "safe close cursor" tests in test_reconnectMike Bayer2014-05-301-14/+57
| | | | | | | | | | | - Fixed bug which would occur if a DBAPI exception occurs when the engine first connects and does its initial checks, and the exception is not a disconnect exception, yet the cursor raises an error when we try to close it. In this case the real exception would be quashed as we tried to log the cursor close exception via the connection pool and failed, as we were trying to access the pool's logger in a way that is inappropriate in this very specific scenario. fixes #3063
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-1/+1
| | | | Found using: https://github.com/intgr/topy
* - fix the uuid routine here to not run out of uuidsMike Bayer2014-03-241-0/+5
|
* - A major improvement made to the mechanics by which the :class:`.Engine`Mike Bayer2014-03-221-6/+8
| | | | | | | | | | | | recycles the connection pool when a "disconnect" condition is detected; instead of discarding the pool and explicitly closing out connections, the pool is retained and a "generational" timestamp is updated to reflect the current time, thereby causing all existing connections to be recycled when they are next checked out. This greatly simplifies the recycle process, removes the need for "waking up" connect attempts waiting on the old pool and eliminates the race condition that many immediately-discarded "pool" objects could be created during the recycle operation. fixes #2985
* - remove informix dialect, moved out to ↵Mike Bayer2013-11-171-10/+0
| | | | | | https://bitbucket.org/zzzeek/sqlalchemy_informixdb - remove informix, maxdb, access symbols from tests etc.
* Dialect.initialize() is not called a second time if an :class:`.Engine`Mike Bayer2013-07-111-3/+31
| | | | | | is recreated, due to a disconnect error. This fixes a particular issue in the Oracle 8 dialect, but in general the dialect.initialize() phase should only be once per dialect. Also in 0.8.3. [ticket:2776]
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-301-225/+218
| | | | | | | | | | | | actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
* - additional oracle fixes. cx_oracle under py3k is complaining about tuples ↵Mike Bayer2013-05-271-1/+4
| | | | | | | to executemany(), so just unconditionally turn this into a list - this one test segfaults only on py3k + cx_oracle
* merge defaultMike Bayer2013-04-301-2/+2
|\
| * missing commaMike Bayer2013-04-301-2/+2
| |
* | merge defaultMike Bayer2013-04-291-13/+6
|\ \ | |/
| * Updated mysqlconnector dialect to check for disconnect basedMike Bayer2013-04-291-13/+6
| | | | | | | | | | on the apparent string message sent in the exception; tested against mysqlconnector 1.0.9.
* | - the raw 2to3 runMike Bayer2013-04-271-12/+12
|/ | | | - went through examples/ and cleaned out excess list() calls
* - test + changelog for [ticket:2691]Mike Bayer2013-04-181-1/+23
|
* Improvements to Connection auto-invalidationMike Bayer2013-04-111-14/+122
| | | | | | | | | | | | | handling. If a non-disconnect error occurs, but leads to a delayed disconnect error within error handling (happens with MySQL), the disconnect condition is detected. The Connection can now also be closed when in an invalid state, meaning it will raise "closed" on next usage, and additionally the "close with result" feature will work even if the autorollback in an error handling routine fails and regardless of whether the condition is a disconnect or not. [ticket:2695]
* mymysql dialectHajime Nakagami2013-03-011-0/+3
|
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-6/+7
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* -whitespace bonanza, contdMike Bayer2012-07-281-3/+3
|
* - [bug] Fixed bug whereby if a database restartMike Bayer2012-06-221-0/+27
| | | | | | | affected multiple connections, each connection would individually invoke a new disposal of the pool, even though only one disposal is needed. [ticket:2522]
* - [bug] Fixed bug whereby transaction.rollback()Mike Bayer2011-12-041-0/+21
| | | | | | | | | | | would throw an error on an invalidated connection if the transaction were a two-phase or savepoint transaction. For plain transactions, rollback() is a no-op if the connection is invalidated, so while it wasn't 100% clear if it should be a no-op, at least now the interface is consistent. [ticket:2317]
* - make sure we definitely get every connection createdMike Bayer2011-05-141-0/+1
| | | | | - ensure we lose self.conns, cx_oracle only closes on __del__ - fix reconnectingfixture to lose all connection references
* - hardcore force every connection into a strong-referenced set, rollback on ↵Mike Bayer2011-04-251-4/+10
| | | | | | | | | every test, close on every context. this uses pool events but bypasses the pool's fairy/record/dispose services. pypy still seems to expose some holes in that at least as far as what some (or maybe just one, cant find it yet) of the tests does. haven't tested this too deeply, just on sqlite + postgres, cypthon 2.7 + pypy. will see what the buildbot says
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-6/+7
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - Non-DBAPI errors which occur in the scope of an `execute()`Mike Bayer2011-02-091-15/+12
| | | | | | | | call are now wrapped in sqlalchemy.exc.StatementError, and the text of the SQL statement and repr() of params is included. This makes it easier to identify statement executions which fail before the DBAPI becomes involved. [ticket:2015]
* - add connection and cursor to is_disconnect(). We aren't using it yet,Mike Bayer2011-02-091-4/+35
| | | | | | | | | | | | | | | but we'd like to. Most DBAPIs don't give us anything we can do with it. Some research was done on psycopg2 and it still seems like they give us no adequate method (tried connection.closed, cursor.closed, connection.status). mxodbc claims their .closed attribute will work (but I am skeptical). - remove beahvior in pool that auto-invalidated a connection when the cursor failed to create. That's not the pool's job. we need the conn for the error logic. Can't get any tests to fail, curious why that behavior was there, guess we'll find out (or not). - add support for psycopg2 version detection. even though we have no use for it yet... - adjust one of the reconnect tests to work with oracle's horrendously slow connect speed
* - New DBAPI support for pymysql, a pure Python portMike Bayer2011-01-261-0/+3
| | | | of MySQL-python. [ticket:1991]
* - whitespace removal bonanzaMike Bayer2011-01-021-14/+14
|
* - sqlalchemy.test and nose plugin moves back to being entirelyMike Bayer2010-11-281-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | outside of "sqlalchemy" and under "test/". Rationale: - coverage plugin works without issue, without need for an awkward additional package install - command line for "nosetests" isn't polluted with SQLAlchemy options [ticket:1949]
| * - move sqlalchemy.test to test.libMike Bayer2010-11-151-4/+4
| |
* | - initial patch for [ticket:1926]Mike Bayer2010-11-171-1/+1
|/
* - *Major* cleanup / modernization of the InformixMike Bayer2010-10-011-2/+12
| | | | | dialect for 0.6, courtesy Florian Apolloner. [ticket:1906]
* - replaced all self.__connection.is_valid withMike Bayer2010-08-261-4/+35
| | | | | | | | | | | "safe" self._connection_is_valid. - Fixed bug in Connection whereby if a "disconnect" event occurred in the "initialize" phase of the first connection pool connect, an AttributeError would be raised when the Connection would attempt to invalidate the DBAPI connection. [ticket:1894] - Connection.invalidate() can be called more than once and subsequent calls do nothing.
* Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual ↵Mike Bayer2010-07-111-45/+41
| | | | intervention
* merge tipMike Bayer2010-05-031-2/+35
|\
| * - Fixed bug in connection pool cursor wrapper whereby if aMike Bayer2010-04-281-0/+28
|/ | | | | cursor threw an exception on close(), the logging of the message would fail. [ticket:1786]
* merge 0.6 series to trunk.Mike Bayer2009-08-061-8/+10
|
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-0/+354
See README.unittests for information on how to run the tests. [ticket:970]