Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second start fails when dbpath is specified #9

Open
warvariuc opened this issue Jul 2, 2015 · 0 comments
Open

Second start fails when dbpath is specified #9

warvariuc opened this issue Jul 2, 2015 · 0 comments

Comments

@warvariuc
Copy link
Contributor

Using nose2 plugin with this config:

[unittest]
plugins = mongobox.nose2_plugin

[mongobox]
port = 27018
dbpath = /run/shm/mongobox

When I start the tests directory /run/shm/mongobox is created. But it's not removed when the server stops. mongobox.mongobox.MongoBox#stop:

        if self._db_path_is_temporary:
            shutil.rmtree(self.db_path)
            self.db_path = None

The directory is there:

$ du -sh /run/shm/mongobox
65M     /run/shm/mongobox

When I start the tests second time:

  File "/home/vic/projects/venv/brain2/local/lib/python2.7/site-packages/mongobox/nose2_plugin.py", line 62, in pluginsLoaded
    self.mongobox.start()
  File "/home/vic/projects/venv/brain2/local/lib/python2.7/site-packages/mongobox/mongobox.py", line 89, in start
    return self._wait_till_started()
  File "/home/vic/projects/venv/brain2/local/lib/python2.7/site-packages/mongobox/mongobox.py", line 134, in _wait_till_started
    self.stop()
  File "/home/vic/projects/venv/brain2/local/lib/python2.7/site-packages/mongobox/mongobox.py", line 100, in stop
    os.kill(self.process.pid, 9)
OSError: [Errno 3] No such process

Looks like because the directory was not removed it thinks that the server is still running.

Am I supposed to remove the directory manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant