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