Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Kirill Smelkov
ZODB
Commits
acefaba3
Commit
acefaba3
authored
Jun 11, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows: disable FileStorageTests.checkFlushNeededAfterTruncate
parent
f08b40e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
src/ZODB/tests/testFileStorage.py
src/ZODB/tests/testFileStorage.py
+14
-4
No files found.
src/ZODB/tests/testFileStorage.py
View file @
acefaba3
...
...
@@ -15,6 +15,7 @@ import doctest
import
os
if
os
.
environ
.
get
(
'USE_ZOPE_TESTING_DOCTEST'
):
from
zope.testing
import
doctest
import
sys
import
unittest
import
transaction
import
ZODB.FileStorage
...
...
@@ -302,9 +303,18 @@ class FileStorageTests(
# is based on what was cached during the first load.
self
.
assertEqual
(
storage
.
load
(
z64
)[
0
],
b'foo'
if
fail
else
b'bar'
)
def
checkFlushNeededAfterTruncate
(
self
):
self
.
_storage
.
_files
.
flush
=
lambda
:
None
self
.
checkFlushAfterTruncate
(
True
)
# We want to be sure that the above test detects any regression
# in the code it checks, because any bug here is like a time bomb: not
# obvious, hard to reproduce, with possible data corruption.
# It's even more important that FilePool.flush() is quite aggressive and
# we'd like to optimize it when Python gets an API to flush read buffers.
# Therefore, 'checkFlushAfterTruncate' is tested in turn by another unit
# test.
# On Windows, flushing explicitely is not (always?) necessary.
if
sys
.
platform
!=
'win32'
:
def
checkFlushNeededAfterTruncate
(
self
):
self
.
_storage
.
_files
.
flush
=
lambda
:
None
self
.
checkFlushAfterTruncate
(
True
)
class
FileStorageHexTests
(
FileStorageTests
):
...
...
@@ -389,7 +399,7 @@ class AnalyzeDotPyTest(StorageTestBase.StorageTestBase):
self
.
_storage
=
ZODB
.
FileStorage
.
FileStorage
(
"Source.fs"
,
create
=
True
)
def
checkanalyze
(
self
):
import
types
,
sys
import
types
from
BTrees.OOBTree
import
OOBTree
from
ZODB.scripts
import
analyze
...
...
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