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
Xavier Thompson
neoppod
Commits
a979165a
Commit
a979165a
authored
Oct 09, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stress: fix SQLite support and make it usable even if MySQLdb is not installed
parent
b0a6b8ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
neo/tests/__init__.py
neo/tests/__init__.py
+2
-1
neo/tests/functional/__init__.py
neo/tests/functional/__init__.py
+0
-1
tools/stress
tools/stress
+4
-1
No files found.
neo/tests/__init__.py
View file @
a979165a
...
...
@@ -26,7 +26,6 @@ import sys
import
tempfile
import
unittest
import
weakref
import
MySQLdb
import
transaction
from
contextlib
import
contextmanager
...
...
@@ -141,6 +140,7 @@ def getTempDirectory():
def
setupMySQLdb
(
db_list
,
clear_databases
=
True
):
if
mysql_pool
:
return
mysql_pool
.
setup
(
db_list
,
clear_databases
)
import
MySQLdb
from
MySQLdb.constants.ER
import
BAD_DB_ERROR
user
=
DB_USER
password
=
''
...
...
@@ -178,6 +178,7 @@ class MySQLPool(object):
self
.
kill
(
*
self
.
_mysqld_dict
)
def
setup
(
self
,
db_list
,
clear_databases
):
import
MySQLdb
start_list
=
set
(
db_list
).
difference
(
self
.
_mysqld_dict
)
if
start_list
:
start_list
=
sorted
(
start_list
)
...
...
neo/tests/functional/__init__.py
View file @
a979165a
...
...
@@ -22,7 +22,6 @@ import ZODB
import
socket
import
signal
import
random
import
MySQLdb
import
sqlite3
import
unittest
import
tempfile
...
...
tools/stress
View file @
a979165a
...
...
@@ -650,11 +650,14 @@ def main():
parser
.
error
(
'--datadir: meaningless when using an existing MySQL server'
)
kw
=
{
'wait'
:
-
1
}
if
args
.
engine
:
kw
[
'engine'
]
=
args
.
engine
kw
=
dict
(
db_list
=
db_list
,
name
=
'stress'
,
partitions
=
args
.
partitions
,
replicas
=
args
.
replicas
,
adapter
=
args
.
adapter
,
address_type
=
args
.
address_type
,
temp_dir
=
args
.
logdir
or
args
.
datadir
or
getTempDirectory
(),
storage_kw
=
{
'engine'
:
args
.
engine
,
'wait'
:
-
1
}
)
storage_kw
=
kw
)
if
args
.
command
==
'run'
:
NFQueue
.
delay
=
args
.
delay
...
...
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