mirror of https://github.com/sysown/proxysql
#410 Migrating tests to new multiple-OS format
parent
8aa060ac11
commit
cb86e08a6d
@ -1,16 +1,19 @@
|
||||
from proxysql_base_test import ProxySQLBaseTest
|
||||
|
||||
from MySQLdb import OperationalError
|
||||
from nose.tools import raises
|
||||
|
||||
class AdminTest(ProxySQLBaseTest):
|
||||
|
||||
SCENARIO = "./scenarios/1backend"
|
||||
def _test_stop_main_thread(self):
|
||||
try:
|
||||
# This test will just assert that PROXYSQL STOP works correctly
|
||||
# Since September 2015, the behaviour has been changed - PROXYSQL STOP
|
||||
# executes faster and immediately shuts down the connections, thus this
|
||||
# test is expected to raise OperationalError
|
||||
self.run_query_proxysql_admin("PROXYSQL STOP")
|
||||
self.assertEqual(0, 1)
|
||||
except OperationalError:
|
||||
self.assertEqual(1, 1)
|
||||
|
||||
@raises(OperationalError)
|
||||
def test_stop_main_thread(self):
|
||||
# This test will just assert that PROXYSQL STOP works correctly
|
||||
# Since September 2015, the behaviour has been changed - PROXYSQL STOP
|
||||
# executes faster and immediately shuts down the connections, thus this
|
||||
# test is expected to raise OperationalError
|
||||
ProxySQLBaseTest.run_query_proxysql_admin("PROXYSQL STOP")
|
||||
self.run_in_docker_scenarios(self._test_stop_main_thread)
|
||||
Loading…
Reference in new issue