summaryrefslogtreecommitdiff
path: root/test/engine
Commit message (Collapse)AuthorAgeFilesLines
* - rework the handle error on connect tests from test_parsconnect whereMike Bayer2014-12-102-236/+245
| | | | they don't really belong into a new suite in test_execute
* - identify another spot where _handle_dbapi_error() needs to do somethingMike Bayer2014-12-081-0/+28
| | | | | differently for the case where it is called in an already-invalidated state; don't call upon self.connection
* - 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-052-3/+3
| | | | | | | | | | 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
* - move inner calls to _revalidate_connection() outside of existingMike Bayer2014-12-051-1/+34
| | | | | _handle_dbapi_error(); these are now handled already and the reentrant call is not needed / breaks things. Adjustment to 41e7253dee168b8c26c49 /
* - The engine-level error handling and wrapping routines will nowMike Bayer2014-12-051-1/+112
| | | | | | | | | take effect in all engine connection use cases, including when user-custom connect routines are used via the :paramref:`.create_engine.creator` parameter, as well as when the :class:`.Connection` encounters a connection error on revalidation. fixes #3266
* - pep8 cleanupMike Bayer2014-12-051-58/+77
|
* Merge branch 'master' into fdbsql-testsScott Dugas2014-11-034-144/+226
|\ | | | | | | | | Conflicts: lib/sqlalchemy/testing/exclusions.py
| * - control the module name of the exception here for py3k compatMike Bayer2014-10-191-7/+14
| |
| * - Exception messages have been spiffed up a bit. The SQL statementMike Bayer2014-10-172-6/+8
| | | | | | | | | | | | | | | | | | | | | | and parameters are not displayed if None, reducing confusion for error messages that weren't related to a statement. The full module and classname for the DBAPI-level exception is displayed, making it clear that this is a wrapped DBAPI exception. The statement and parameters themselves are bounded within a bracketed sections to better isolate them from the error message and from each other. fixes #3172
| * - adjustment for ref #3200 as we need an immutabledict() here soMike Bayer2014-10-071-0/+12
| | | | | | | | | | that union() can be called, in the case of a dialect that uses execution options inside of initialize() (e.g. oursql)
| * - The execution options passed to an :class:`.Engine` either viaMike Bayer2014-10-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | :paramref:`.create_engine.execution_options` or :meth:`.Engine.update_execution_options` are not passed to the special :class:`.Connection` used to initialize the dialect within the "first connect" event; dialects will usually perform their own queries in this phase, and none of the current available options should be applied here. In particular, the "autocommit" option was causing an attempt to autocommit within this initial connect which would fail with an AttributeError due to the non-standard state of the :class:`.Connection`. fixes #3200
| * - repair autorollback for branchesMike Bayer2014-09-261-0/+12
| |
| * - Fixed bug where a "branched" connection, that is the kind you getMike Bayer2014-09-263-10/+110
| | | | | | | | | | | | | | | | 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
| * - these tests don't test anything in SQLAlchemy - from our perpsective,Mike Bayer2014-09-191-133/+0
| | | | | | | | | | | | | | we need to be in transactions (tested elsewhere) and we need to emit the correct FOR UPDATE strings (tested elsewhere). There's nothing in SQLA to be tested as far as validating that for update causes exceptions or not, and these tests frequently fail as they are timing sensitive.
| * - Fixed bug that affected generally the same classes of eventMike Bayer2014-09-181-0/+42
| | | | | | | | | | | | | | | | | | | | as that of :ticket:`3199`, when the ``named=True`` parameter would be used. Some events would fail to register, and others would not invoke the event arguments correctly, generally in the case of when an event was "wrapped" for adaption in some other way. The "named" mechanics have been rearranged to not interfere with the argument signature expected by internal wrapper functions. fixes #3197
* | Added new requirement for check_constraintsScott Dugas2014-10-231-0/+1
|/
* - An adjustment to table/index reflection such that if an indexMike Bayer2014-09-021-0/+20
| | | | | | | reports a column that isn't found to be present in the table, a warning is emitted and the column is skipped. This can occur for some special system column situations as has been observed with Oracle. fixes #3180
* - Fixed bug in connection pool logging where the "connection checked out"Mike Bayer2014-08-201-2/+83
| | | | | | | | debug logging message would not emit if the logging were set up using ``logging.setLevel()``, rather than using the ``echo_pool`` flag. Tests to assert this logging have been added. This is a regression that was introduced in 0.9.0. fixes #3168
* - pep8 cleanupMike Bayer2014-08-202-25/+13
|
* Merge remote-tracking branch 'origin/pr/125' into pr125Mike Bayer2014-08-162-61/+56
|\
| * two_phase_recover, COMMIT PREPARED in transactionTony Locke2014-08-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In test/engine/test_transaction/test_two_phase_recover(), a COMMIT PREPARED is issued while in a transaction. This causes an error, and a prepared transaction is left hanging around which causes the subsequent test to hang. I've altered the test to execute the offending query with autocommit=true, then when it gets to the COMMIT PRPARED it can go ahead. There's another complication for pg8000 because its tpc_recover() method started a transaction if one wasn't already in progress. I've decided that this is incorrect behaviour and so from pg8000-1.9.13 this method never starts or stops a transaction.
| * PEP8 tidy of test/engine/test_reconnectTony Locke2014-08-021-58/+52
| |
* | - The string keys that are used to determine the columns impactedMike Bayer2014-08-141-3/+45
| | | | | | | | | | | | | | | | | | for an INSERT or UPDATE are now sorted when they contribute towards the "compiled cache" cache key. These keys were previously not deterministically ordered, meaning the same statement could be cached multiple times on equivalent keys, costing both in terms of memory as well as performance. fixes #3165
* | Providing an autoload_with info automatically sets autoload to TrueMalik Diarra2014-08-091-0/+16
| |
* | - take out the iterator approach here as it does not support concurrent accessMike Bayer2014-08-071-8/+9
|/
* - workaround removal of nested() in py3kMike Bayer2014-07-301-1/+2
|
* - ensure all tests are named test_*Mike Bayer2014-07-303-8/+9
|
* pep8 cleanupMike Bayer2014-07-291-285/+342
|
* - The exception wrapping system for DBAPI errors can now accommodateMike Bayer2014-07-291-1/+26
| | | | | | | | non-standard DBAPI exceptions, such as the psycopg2 TransactionRollbackError. These exceptions will now be raised using the closest available subclass in ``sqlalchemy.exc``, in the case of TransactionRollbackError, ``sqlalchemy.exc.OperationalError``. fixes #3075
* - add support for tags, including include/exclude support.Mike Bayer2014-07-271-5/+13
| | | | simplify tox again now that we can exclude tests more easily
* Merge branch 'master' into xdist_pocMike Bayer2014-07-261-2/+3
|\
| * fix paren hereMike Bayer2014-07-261-2/+3
| |
* | - scale up for mysql, sqliteMike Bayer2014-07-261-9/+14
|/
* - more pg8000 tests passingMike Bayer2014-07-253-4/+4
|
* - The MySQL dialect will now disable :meth:`.ConnectionEvents.handle_error`Mike Bayer2014-07-251-0/+28
| | | | | | | | | | events from firing for those statements which it uses internally to detect if a table exists or not. This is achieved using an execution option ``skip_user_error_events`` that disables the handle error event for the scope of that execution. In this way, user code that rewrites exceptions doesn't need to worry about the MySQL dialect or other dialects that occasionally need to catch SQLAlchemy specific exceptions.
* Merge pull request #100 from plaes/typosmike bayer2014-07-061-2/+2
|\ | | | | Typo fixes
| * typo: s/thbe/thepr/100Priit Laes2014-06-281-1/+1
| |
| * typo: s/tranasction/transactionPriit Laes2014-06-281-2/+2
| |
* | - add test support for disconnect modificationMike Bayer2014-07-041-0/+25
| |
* | - rework the entire approach to #3076. As we need to catch all exceptionsMike Bayer2014-07-041-125/+267
| | | | | | | | | | | | | | | | | | | | | | in all cases unconditionally, the number of use cases that go beyond what dbapi_error() is expecting has gone too far for an 0.9 release. Additionally, the number of things we'd like to track is really a lot more than the five arguments here, and ExecutionContext is really not suitable as totally public API for this. So restore dbapi_error to its old version, deprecate, and build out handle_error instead. This is a lot more extensible and doesn't get in the way of anything compatibility-wise.
* | - The mechanics of the :meth:`.ConnectionEvents.dbapi_error` handlerMike Bayer2014-07-031-0/+111
|/ | | | | | | have been enhanced such that the function handler is now capable of raising or returning a new exception object, which will replace the exception normally being thrown by SQLAlchemy. fixes #3076
* - 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-262-2/+2
| | | | Found using: https://github.com/intgr/topy
* pickle of execption not supported on mysqlconnectorMike Bayer2014-03-281-0/+2
|
* - work on fixing some race-condition failures:Mike Bayer2014-03-261-4/+5
| | | | | | | | | | | 1. make sure pool._invalidate() sets the timestamp up before invalidating the target connection. we can otherwise show how the conn.invalidate() + pool._invalidate() can lead to an extra connection being made. 2. to help with that, soften up the check on connection.invalidate() when connection is already closed. a warning is fine here 3. add a mutex to test_max_overflow() when we connect, because the way we're using mock depends on an iterator, that needs to be synchronized
* add some more mock structure so tricky DBAPIs like pypy workMike Bayer2014-03-241-0/+8
|
* - add some more rules to make sure all tests run if DBs are availableMike Bayer2014-03-241-0/+1
|
* - fix the uuid routine here to not run out of uuidsMike Bayer2014-03-241-0/+5
|