mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
Avoid file locking issue when running CLI test (#6449)
__file__ will resolve to tests/test_cli.py, which is already opened by Python. When tests are run on a network file system the test runner may deadlock while waiting for an advisory lock to be released on this file.
This commit is contained in:
@@ -132,7 +132,7 @@ class DataSourceCommandTests(BaseTestCase):
|
||||
self.factory.create_data_source(
|
||||
name="test1",
|
||||
type="sqlite",
|
||||
options=ConfigurationContainer({"dbpath": __file__}),
|
||||
options=ConfigurationContainer({"dbpath": "/notexist.db"}),
|
||||
)
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(manager, ["ds", "test", "test1"])
|
||||
|
||||
Reference in New Issue
Block a user