Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
e6b136a4
Commit
e6b136a4
authored
Jun 15, 2016
by
Jim Fulton
Committed by
GitHub
Jun 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26 from zopefoundation/zodb5
Changed tests to not depend on ZODB underware
parents
2952501b
11b30913
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
src/ZEO/tests/IterationTests.py
src/ZEO/tests/IterationTests.py
+7
-6
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+3
-2
No files found.
src/ZEO/tests/IterationTests.py
View file @
e6b136a4
...
...
@@ -174,8 +174,9 @@ Start a server:
Open a client storage to it and commit a some transactions:
>>> import ZEO, transaction
>>> db = ZEO.DB(addr)
>>> import ZEO, ZODB, transaction
>>> client = ZEO.client(addr)
>>> db = ZODB.DB(client)
>>> conn = db.open()
>>> for i in range(10):
... conn.root().i = i
...
...
@@ -183,19 +184,19 @@ Open a client storage to it and commit a some transactions:
Create an iterator:
>>> it = c
onn._storage
.iterator()
>>> it = c
lient
.iterator()
>>> tid1 = it.next().tid
Restart the storage:
>>> stop_server(adminaddr)
>>> wait_disconnected(c
onn._storage
)
>>> wait_disconnected(c
lient
)
>>> _ = start_server('<filestorage>\npath fs\n</filestorage>', addr=addr)
>>> wait_connected(c
onn._storage
)
>>> wait_connected(c
lient
)
Now, we'll create a second iterator:
>>> it2 = c
onn._storage
.iterator()
>>> it2 = c
lient
.iterator()
If we try to advance the first iterator, we should get an error:
...
...
src/ZEO/tests/testZEO.py
View file @
e6b136a4
...
...
@@ -1561,7 +1561,8 @@ def gracefully_handle_abort_while_storing_many_blobs():
>>> logging.getLogger().addHandler(handler)
>>> addr, _ = start_server(blob_dir='blobs')
>>> c = ZEO.connection(addr, blob_dir='cblobs')
>>> client = ZEO.client(addr, blob_dir='cblobs')
>>> c = ZODB.connection(client)
>>> c.root.x = ZODB.blob.Blob(b'z'*(1<<20))
>>> c.root.y = ZODB.blob.Blob(b'z'*(1<<2))
>>> t = c.transaction_manager.get()
...
...
@@ -1578,7 +1579,7 @@ Now we'll try to use the connection, mainly to wait for everything to
get processed. Before we fixed this by making tpc_finish a synchronous
call to the server. we'd get some sort of error here.
>>> _ = c
._storage
._server.loadEx(b'\0'*8)
>>> _ = c
lient
._server.loadEx(b'\0'*8)
>>> c.close()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment