DistributedTaskScheduling / JobAdder

Source code of the JobAdder project
GNU General Public License v3.0
2 stars 1 forks source link

Simple integration tests #158

Closed JohannesGaessler closed 4 years ago

JohannesGaessler commented 4 years ago

This PR aims to add simple integration tests.

Among others I have found and fixed the following bugs:

I also made the following misc changes:

nikolatzotchev commented 4 years ago

remote_module=WORKER_REMOTE_MODULE % self._uid, that is probably from the last PR, but why is the remote set to this, when the file in ja-integration is called worker_0.py this brakes when I try to run it(doesn't brake but I get an error message from the logger) 2020-03-27 19:24:00,828 - ja.common.proxy.ssh - ERROR - Failed to communicate with remote: /usr/bin/python3: No module named ja_integration.remote.worker0 that is what I get.

nikolatzotchev commented 4 years ago

also I don't now how link it but on line 67 config_path=WORKER_CONF_PATH % self._index, socket_path=WORKER_SOCKET_PATH, shouldn't the socket_path be WORKER_SOCKET_PATH % self._index ?

JohannesGaessler commented 4 years ago

@nikolatzotchev Thanks for the input, it should be fixed now.

nikolatzotchev commented 4 years ago

How do we check that the tests work, because right now we just see that nothing crashes, do we just read the logs. For example how can we check that the job was successfully executed on the machine (in python).

JohannesGaessler commented 4 years ago

I have added assertions to the tests: That there is 1 active job on the server and worker while the job is running and 0 jobs on the server and worker after the job has finished.

nikolatzotchev commented 4 years ago

When I was testing, there was a "error" because the job didn't have an uid, that was when the job was finished and the worker sends the message I worked when the uid was set.

JohannesGaessler commented 4 years ago

That is fixed now. The PR for setting job UIDs was merged and this PR was rebased onto master.

nikolatzotchev commented 4 years ago

aa ok