Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
neoppod
Commits
bbd591f8
Commit
bbd591f8
authored
Sep 16, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: add tests reproducing a bug affecting undoLog() and transactionLog()
parent
cbb233f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
neo/client/app.py
neo/client/app.py
+4
-0
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+39
-0
No files found.
neo/client/app.py
View file @
bbd591f8
...
@@ -904,6 +904,10 @@ class Application(object):
...
@@ -904,6 +904,10 @@ class Application(object):
raise
NEOStorageError
(
'Transaction %r not found'
%
(
tid
,
))
raise
NEOStorageError
(
'Transaction %r not found'
%
(
tid
,
))
return
(
txn_info
,
txn_ext
)
return
(
txn_info
,
txn_ext
)
# XXX: The following 2 methods fail when they reconnect to a storage after
# they already sent a request to a previous storage.
# See also testStorageReconnectDuringXxx
def
undoLog
(
self
,
first
,
last
,
filter
=
None
,
block
=
0
):
def
undoLog
(
self
,
first
,
last
,
filter
=
None
,
block
=
0
):
# XXX: undoLog is broken
# XXX: undoLog is broken
if
last
<
0
:
if
last
<
0
:
...
...
neo/tests/threaded/test.py
View file @
bbd591f8
...
@@ -147,3 +147,42 @@ class Test(NEOThreadedTest):
...
@@ -147,3 +147,42 @@ class Test(NEOThreadedTest):
def
testVerificationCommitUnfinishedTransactionsFastStartup
(
self
):
def
testVerificationCommitUnfinishedTransactionsFastStartup
(
self
):
self
.
testVerificationCommitUnfinishedTransactions
(
True
)
self
.
testVerificationCommitUnfinishedTransactions
(
True
)
def
testStorageReconnectDuringStore
(
self
):
cluster
=
NEOCluster
(
replicas
=
1
)
try
:
cluster
.
start
()
t
,
c
=
cluster
.
getTransaction
()
c
.
root
()[
0
]
=
'ok'
while
cluster
.
client
.
cp
.
connection_dict
:
cluster
.
client
.
cp
.
_dropConnections
()
t
.
commit
()
# store request
finally
:
cluster
.
stop
()
# The following 2 tests fail because the same queue is used for
# AskTIDs(From) requests and reconnections. The same bug affected
# history() before df47e5b1df8eabbff1383348b6b8c476bca0c328
def
testStorageReconnectDuringTransactionLog
(
self
):
cluster
=
NEOCluster
(
storage_count
=
2
,
partitions
=
2
)
try
:
cluster
.
start
()
t
,
c
=
cluster
.
getTransaction
()
while
cluster
.
client
.
cp
.
connection_dict
:
cluster
.
client
.
cp
.
_dropConnections
()
tid
,
(
t1
,)
=
cluster
.
client
.
transactionLog
(
ZERO_TID
,
c
.
root
().
_p_serial
,
10
)
finally
:
cluster
.
stop
()
def
testStorageReconnectDuringUndoLog
(
self
):
cluster
=
NEOCluster
(
storage_count
=
2
,
partitions
=
2
)
try
:
cluster
.
start
()
t
,
c
=
cluster
.
getTransaction
()
while
cluster
.
client
.
cp
.
connection_dict
:
cluster
.
client
.
cp
.
_dropConnections
()
t1
,
=
cluster
.
client
.
undoLog
(
0
,
10
)
finally
:
cluster
.
stop
()
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