Merge "switch mysql functional tests to PyMySQL"
This commit is contained in:
commit
bfe6c895fa
@ -241,6 +241,9 @@ class SchedulerServiceTest(base.DbTestCase):
|
||||
self._assert_single_item(calls, target_method_name=TARGET_METHOD_PATH)
|
||||
|
||||
self.queue.get()
|
||||
|
||||
eventlet.sleep(0.1)
|
||||
|
||||
self.assertRaises(
|
||||
exc.DBEntityNotFoundError,
|
||||
db_api.get_delayed_call,
|
||||
@ -335,7 +338,4 @@ class SchedulerServiceTest(base.DbTestCase):
|
||||
for _ in range(number_delayed_calls):
|
||||
self.queue.get()
|
||||
|
||||
self.assertEqual(
|
||||
[2, 2, 1],
|
||||
processed_calls_at_time
|
||||
)
|
||||
self.assertListEqual([1, 2, 2], sorted(processed_calls_at_time))
|
||||
|
10
run_tests.sh
10
run_tests.sh
@ -139,7 +139,7 @@ function setup_db_pylib {
|
||||
;;
|
||||
mysql )
|
||||
echo "Installing python library for MySQL"
|
||||
${wrapper} pip install mysql-python
|
||||
${wrapper} pip install PyMySQL
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -149,12 +149,18 @@ function setup_db_cfg {
|
||||
sqlite )
|
||||
rm -f .mistral.conf
|
||||
;;
|
||||
"postgresql" | "mysql" )
|
||||
"postgresql" )
|
||||
oslo-config-generator --config-file \
|
||||
./tools/config/config-generator.mistral.conf \
|
||||
--output-file .mistral.conf
|
||||
sed -i "s/#connection = <None>/connection = $db_type:\/\/$username:$password@localhost\/$dbname/g" .mistral.conf
|
||||
;;
|
||||
"mysql" )
|
||||
oslo-config-generator --config-file \
|
||||
./tools/config/config-generator.mistral.conf \
|
||||
--output-file .mistral.conf
|
||||
sed -i "s/#connection = <None>/connection = mysql+pymysql:\/\/$username:$password@localhost\/$dbname/g" .mistral.conf
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user