An error occurred fetching the project authors.
- 26 Sep, 2002 1 commit
-
-
Guido van Rossum authored
StorageServer as well as that of the storage itself. Currently the test fails.
-
- 20 Sep, 2002 1 commit
-
-
Guido van Rossum authored
ClientStorage constructor called with both wait=1 and read_only_fallback=1 should return, indicating its readiness, when a read-only connection was made. This is done by calling connect(sync=1). Previously this waited for the ConnectThread to finish, but that thread doesn't finish until it's made a read-write connection, so a different mechanism is needed. I ended up doing a major overhaul of the interfaces between ClientStorage, ConnectionManager, ConnectThread/ConnectWrapper, and even ManagedConnection. Changes: ClientStorage.py: ClientStorage: - testConnection() now returns just the preferred flag; stubs are cheap and I like to have the notifyConnected() signature be the same for clients and servers. - notifyConnected() now takes a connection (to match the signature of this method in StorageServer), and creates a new stub. It also takes care of the reconnect business if the client was already connected, rather than the ClientManager. It stores the connection as self._connection so it can close the previous one. This is also reset by notifyDisconnected(). zrpc/client.py: ConnectionManager: - Changed self.thread_lock into a condition variable. It now also protects self.connection. The condition is notified when self.connection is set to a non-None value in connect_done(); connect(sync=1) waits for it. The self.connected variable is no more; we test "self.connection is not None" instead. - Tried to made close() reentrant. (There's a trick: you can't set self.connection to None, conn.close() ends up calling close_conn() which does this.) - Renamed notify_closed() to close_conn(), for symmetry with the StorageServer API. - Added an is_connected() method so ConnectThread.try_connect() doesn't have to dig inside the manager's guts to find out if the manager is connected (important for the disposition of fallback wrappers). ConnectThread and ConnectWrapper: - Follow above changes in the ClientStorage and ConnectionManager APIs: don't close the manager's connection when reconnecting, but leave that up to notifyConnected(); ConnectWrapper no longer manages the stub. - ConnectWrapper sets self.sock to None once it's created a ManagedConnection -- from there on the connection is is charge of closing the socket. zrpc/connection.py: ManagedServerConnection: - Changed the order in which close() calls things; super_close() should be last. ManagedConnection: - Ditto, and call the manager's close_conn() instead of notify_closed(). tests/testZEO.py: - In checkReconnectSwitch(), we can now open the client storage with wait=1 and read_only_fallback=1.
-
- 19 Sep, 2002 1 commit
-
-
Guido van Rossum authored
On Windows, port+1 is used as well, so we don't want accidentally to allocate two adjacent ports when we ask for multiple ports.
-
- 17 Sep, 2002 8 commits
-
-
Guido van Rossum authored
a variety of exceptions. Catch all of them. (The only ones I've seen are Disconnected and ReadOnlyError, but since we're disconnected abruptly as part of the switch, it's possible to see any of the exceptions that checkReconnection() catches.)
-
Guido van Rossum authored
read-write server now works!!!
-
Guido van Rossum authored
unlocking bug in new_oid().
-
Guido van Rossum authored
randrange(25000, 30000) to get one random port each time _getAddr() is called.
-
Guido van Rossum authored
Otherwise, when running the tests in an endless loop with "test.py -L", eventually tests start failing because they're out of ports.
-
Guido van Rossum authored
-
Guido van Rossum authored
Made progress with the reconnect tests. The simple ones now work. The trick was to call asyncore.poll() until the client is (dis)connected before going to the next phase of the test; I added pollUp() and pollDown() helper methods for this purpose. The reconnect "upgrade" test doesn't work yet. That is, a client is created in fallback mode, initially connecting to a read-only server. So far so good. Then the server is shut down. Somehow an attempt to store once the server is down simply *hangs*. No progress with the multiple server fallback test.
-
Guido van Rossum authored
-
- 15 Sep, 2002 1 commit
-
-
Guido van Rossum authored
This code used to assume that all arguments were strings. It was always wrong (create was passed as '0' or '1' rather than as 0 or 1) but this was somehow masked. When I added readonly, things broke. The solution is that winserver.py ha a convention that an argument starting with '=' is evaluated as an expression, and _startserver in testZEO's WindowsConnectionText uses this for the create and readonly args.
-
- 13 Sep, 2002 1 commit
-
-
Guido van Rossum authored
Add a LOG call to ConnectionTests.setUp(). Add tests for the ClientStorage read_only and read_only_fallback features. Note that the latter feature is not completely working yet; the reconnect feature doesn't work, so it's of questionable value for now (though it *does* connect to a read-only storage whe no read-write storage is available).
-
- 12 Sep, 2002 3 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Guido van Rossum authored
-
- 05 Sep, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 29 Aug, 2002 1 commit
-
-
Guido van Rossum authored
-
- 28 Aug, 2002 1 commit
-
-
Guido van Rossum authored
Open the cache later to avoid scanning it twice if a connection is made right away. ClientStorage.close() is now idempotent. ClientStorage stores its addr argument as self._addr so the test suite doesn't have to dig it out of the rpc manager to reopen the storage as readonly. Renamed some of the callbacks into the client for clarity: begin -> beginVerify end -> endVerify invalidate -> invalidateVerify Invalidate -> invalidateTrans
-
- 22 Aug, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 14 Aug, 2002 2 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
- 08 Aug, 2002 1 commit
-
-
Jeremy Hylton authored
StorageTestBase.removefs() will attempt to remove files with all the possible extensions that FileStorage will create. It will raise os.error for any error except ENOENT. Remove many variants of removefs() implemented in the various test suites.
-
- 11 Jun, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 04 Apr, 2002 2 commits
-
-
Jeremy Hylton authored
I expect this code will become ZEO 1.1.
-
Barry Warsaw authored
description fields, which are assigned to attributes on the Transaction object.
-
- 15 Mar, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 12 Feb, 2002 1 commit
-
-
Guido van Rossum authored
trunk. I'm *almost* done with the merge; the only file not yet merged is FileStorage.py.
-
- 25 Jan, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 24 Jan, 2002 1 commit
-
-
Jeremy Hylton authored
The main test suite handles ZEO now.
-
- 21 Jan, 2002 2 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Let super tearDown() close the storage. Tracking changes to ZODB/tests/StorageTestBase.
-
- 02 Nov, 2001 1 commit
-
-
Jeremy Hylton authored
The trunk now has the same code ZEO 1.0b5 plus a few minor changes.
-
- 04 Oct, 2001 1 commit
-
-
Jeremy Hylton authored
-
- 07 Sep, 2001 1 commit
-
-
Jeremy Hylton authored
-
- 24 Aug, 2001 1 commit
-
-
Jeremy Hylton authored
-
- 23 Aug, 2001 1 commit
-
-
Jeremy Hylton authored
-
- 17 Aug, 2001 1 commit
-
-
Jeremy Hylton authored
forker.py: Extend start_zeo_server() on Windows with arg that specifies port, which is used to restart the server on the same port. Remove unnecessary imports. Set PYTHONPATH for the spawned script. testZEO.py: Refactor ConnectionTests into abstract base class with two platform- specific subclasses. Add goofy test_suite() function, which is goofy because I can't figure out how to use unittest any other way. winserver.py: Keep track of storage in ZEOTestServer so that its close() method can be called when the server exits.
-
- 16 Aug, 2001 1 commit
-
-
Jeremy Hylton authored
winserver.py: A small script that runs a ZEO StorageServer and a ZEOTestServer. The ZEOTestServer is used to kill the StorageServer during a unit test's teardown phases. As soon as a client connects to that server, it exits the process. forker.py: Now forks and spawns, depending on os. XXX This needs to be cleaned up a lot, since the interfaces on Windows and Unix are nothing alike. testZEO.py: Add WindowsGenericTests and WindowsZEOFileStorageTests. These test cases use the Windows-specific forker interface. They also use getStorageInfo() to describe the storage, rather than getStorage() to create the storage. This is necessary because the storage instance is created in a separate process.
-
- 01 Jun, 2001 1 commit
-
-
Jeremy Hylton authored
If an exception is raised, make sure the current transaction is aborted. And catch more of the oddball exceptions that can get raised when a server disconnects -- like thread.error.
-