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
Joshua
zodb
Commits
aa0e58c2
Commit
aa0e58c2
authored
Jul 12, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up some unneeded (and bever run) manual tests.
parent
ea35245f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
218 deletions
+0
-218
src/ZEO/scripts/manual_tests/testzeopack.py
src/ZEO/scripts/manual_tests/testzeopack.py
+0
-109
src/ZODB/scripts/manual_tests/testzeopack.py
src/ZODB/scripts/manual_tests/testzeopack.py
+0
-109
No files found.
src/ZEO/scripts/manual_tests/testzeopack.py
deleted
100644 → 0
View file @
ea35245f
# Some simple tests for zeopack.py
# For this to work, zeopack.py must by on your PATH.
from
ZODB.FileStorage
import
FileStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
ZEO.tests
import
forker
import
ZODB
import
os
import
socket
import
threading
import
time
import
unittest
# TODO: The forker interface isn't clearly defined. It's different on
# different branches of ZEO. This will break someday.
# TODO: Only handle the Unix variant of the forker. Just to give Tim
# something to do.
class
PackerTests
(
StorageTestBase
):
def
setUp
(
self
):
StorageTestBase
.
setUp
(
self
)
self
.
started
=
0
def
start
(
self
):
self
.
started
=
1
self
.
path
=
'Data.fs'
self
.
_storage
=
FileStorage
(
self
.
path
)
self
.
db
=
ZODB
.
DB
(
self
.
_storage
)
self
.
do_updates
()
self
.
pid
,
self
.
exit
=
forker
.
start_zeo_server
(
self
.
_storage
,
self
.
addr
)
def
do_updates
(
self
):
for
i
in
range
(
100
):
self
.
_dostore
()
def
tearDown
(
self
):
if
self
.
started
:
self
.
db
.
close
()
self
.
exit
.
close
()
try
:
os
.
kill
(
self
.
pid
,
9
)
except
os
.
error
:
pass
try
:
os
.
waitpid
(
self
.
pid
,
0
)
except
os
.
error
,
err
:
##print "waitpid failed", err
pass
StorageTestBase
.
tearDown
(
self
)
def
set_inet_addr
(
self
):
self
.
host
=
socket
.
gethostname
()
self
.
port
=
forker
.
get_port
()
self
.
addr
=
self
.
host
,
self
.
port
def
testPack
(
self
):
self
.
set_inet_addr
()
self
.
start
()
status
=
os
.
system
(
"zeopack.py -h %s -p %s"
%
(
self
.
host
,
self
.
port
))
assert
status
==
0
assert
os
.
path
.
exists
(
self
.
path
+
".old"
)
def
testPackDays
(
self
):
self
.
set_inet_addr
()
self
.
start
()
status
=
os
.
system
(
"zeopack.py -h %s -p %s -d 1"
%
(
self
.
host
,
self
.
port
))
# Since we specified one day, nothing should get packed
assert
status
==
0
assert
not
os
.
path
.
exists
(
self
.
path
+
".old"
)
def
testAF_UNIXPack
(
self
):
self
.
addr
=
"zeo-socket"
self
.
start
()
status
=
os
.
system
(
"zeopack.py -U %s"
%
self
.
addr
)
assert
status
==
0
assert
os
.
path
.
exists
(
self
.
path
+
".old"
)
def
testNoServer
(
self
):
status
=
os
.
system
(
"zeopack.py -p 19"
)
assert
status
!=
0
def
testWaitForServer
(
self
):
self
.
set_inet_addr
()
def
delayed_start
():
time
.
sleep
(
11
)
self
.
start
()
t
=
threading
.
Thread
(
target
=
delayed_start
)
t
.
start
()
status
=
os
.
system
(
"zeopack.py -h %s -p %s -W"
%
(
self
.
host
,
self
.
port
))
t
.
join
()
assert
status
==
0
assert
os
.
path
.
exists
(
self
.
path
+
".old"
)
class
UpTest
(
unittest
.
TestCase
):
def
testUp
(
self
):
status
=
os
.
system
(
"zeoup.py -p 19"
)
# There is no ZEO server on port 19, so we should see non-zero
# exit status.
assert
status
!=
0
if
__name__
==
"__main__"
:
unittest
.
main
()
src/ZODB/scripts/manual_tests/testzeopack.py
deleted
100644 → 0
View file @
ea35245f
# Some simple tests for zeopack.py
# For this to work, zeopack.py must by on your PATH.
from
ZODB.FileStorage
import
FileStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
ZEO.tests
import
forker
import
ZODB
import
os
import
socket
import
tempfile
import
threading
import
time
import
unittest
# TODO: The forker interface isn't clearly defined. It's different on
# different branches of ZEO. This will break someday.
# TODO: Only handle the Unix variant of the forker. Just to give Tim
# something to do.
class
PackerTests
(
StorageTestBase
):
def
setUp
(
self
):
StorageTestBase
.
setUp
(
self
)
self
.
started
=
0
def
start
(
self
):
self
.
started
=
1
self
.
path
=
'Data.fs'
self
.
_storage
=
FileStorage
(
self
.
path
)
self
.
db
=
ZODB
.
DB
(
self
.
_storage
)
self
.
do_updates
()
self
.
pid
,
self
.
exit
=
forker
.
start_zeo_server
(
self
.
_storage
,
self
.
addr
)
def
do_updates
(
self
):
for
i
in
range
(
100
):
self
.
_dostore
()
def
tearDown
(
self
):
if
self
.
started
:
self
.
db
.
close
()
self
.
exit
.
close
()
try
:
os
.
kill
(
self
.
pid
,
9
)
except
os
.
error
:
pass
try
:
os
.
waitpid
(
self
.
pid
,
0
)
except
os
.
error
,
err
:
##print "waitpid failed", err
pass
StorageTestBase
.
tearDown
(
self
)
def
set_inet_addr
(
self
):
self
.
host
=
socket
.
gethostname
()
self
.
port
=
forker
.
get_port
()
self
.
addr
=
self
.
host
,
self
.
port
def
testPack
(
self
):
self
.
set_inet_addr
()
self
.
start
()
status
=
os
.
system
(
"zeopack.py -h %s -p %s"
%
(
self
.
host
,
self
.
port
))
assert
status
==
0
assert
os
.
path
.
exists
(
self
.
path
+
".old"
)
def
testPackDays
(
self
):
self
.
set_inet_addr
()
self
.
start
()
status
=
os
.
system
(
"zeopack.py -h %s -p %s -d 1"
%
(
self
.
host
,
self
.
port
))
# Since we specified one day, nothing should get packed
assert
status
==
0
assert
not
os
.
path
.
exists
(
self
.
path
+
".old"
)
def
testAF_UNIXPack
(
self
):
self
.
addr
=
tempfile
.
mktemp
(
suffix
=
".zeo-socket"
)
self
.
start
()
status
=
os
.
system
(
"zeopack.py -U %s"
%
self
.
addr
)
assert
status
==
0
assert
os
.
path
.
exists
(
self
.
path
+
".old"
)
def
testNoServer
(
self
):
status
=
os
.
system
(
"zeopack.py -p 19"
)
assert
status
!=
0
def
testWaitForServer
(
self
):
self
.
set_inet_addr
()
def
delayed_start
():
time
.
sleep
(
11
)
self
.
start
()
t
=
threading
.
Thread
(
target
=
delayed_start
)
t
.
start
()
status
=
os
.
system
(
"zeopack.py -h %s -p %s -W"
%
(
self
.
host
,
self
.
port
))
t
.
join
()
assert
status
==
0
assert
os
.
path
.
exists
(
self
.
path
+
".old"
)
class
UpTest
(
unittest
.
TestCase
):
def
testUp
(
self
):
status
=
os
.
system
(
"zeoup.py -p 19"
)
# There is no ZEO server on port 19, so we should see non-zero
# exit status.
assert
status
!=
0
if
__name__
==
"__main__"
:
unittest
.
main
()
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