Comments (6)
As a prelude to working on issue #38, I just tried to build the current test-suite (via cabal configure --enable-tests; cabal build tests
), and it fails with lots of errors like this:
test/Test.hs:163:38: error:
Not in scope: ‘Job.monitorJobRunner’
Module ‘OddJobs.Job’ does not export ‘monitorJobRunner’.
|
163 | let jobMonitorSettings = defaults{ Job.monitorJobRunner = jobRunner
| ^^^^^^^^^^^^^^^^^^^^
It looks like these undefined symbols are from an earlier version of odd-jobs
. Is the jobrunner
test-suite intended to work with the current version?
There are several other code files in this test-suite that are empty or all commented out. Also, the devel
executable seems to have been used for ad hoc testing as some point, but it is also no longer working.
@saurabhnanda, could you describe the current testing process (prior to the implementation of a proper test suite)?
from odd-jobs.
could you describe the current testing process (prior to the implementation of a proper test suite)?
there were simple "example based" tests primarily to ensure that the underlying raw SQL for things like createJob
, scheduleJob
were working.
There was one massive property-based test which first scheduled many randomly created jobs, and then run them, and then assert a bunch of properties.
I'll get the test suite back to working condition and then we can collaborate on it iteratively along with developing the feature and the benchmarks.
from odd-jobs.
@mrputty I've got the tests to compile again in the fix/tests
branch. Although the tests themselves are still failing. I'll spend some time now in getting the tests up-to-speed.
from odd-jobs.
@mrputty the "example based" tests are passing now. The property-based test is still commented-out. I'll take a look at it over the weekend.
from odd-jobs.
@saurabhnanda , thanks for looking at this. I've started thinking about how to write some behavioral tests for #38, but I'd like to get your comments on my draft #55 before I put any real work into that.
from odd-jobs.
@saurabhnanda, I'm soon going to start working on unit test for #38. I normally do Haskell development in Docker containers, and I typically run things like a database for unit testing in a separate container from the one running GHC. The upshot of this is that I'd like to make a change in the test/Test.sh
to facilitate this.
Specifically, I'd like to introduce an environment variable that would, if set, override the hard coded connInfo
that's currently defined in main
. I'd also do a little bit of refactoring around pool creation, but otherwise I don't think anything would have to change, and things would continue to work as they do today when the environment variable is not set.
Let me know if you have any concerns about this.
from odd-jobs.
Related Issues (20)
- Use prepared-statements and bind-params for SQL statements where appropriate
- Need help in using JobErrHandler HOT 3
- Some job callbacks are not used HOT 2
- Add priority to jobs?
- Recommend users fork jobs with Async HOT 1
- Odd jobs create table fails with exception if table already exists. HOT 1
- Support for custom URL roots HOT 3
- Release a new version HOT 6
- Jobs which time out never hit the attempt limit HOT 5
- Test case: Sorting based on job attempts HOT 3
- Add logging for when jobs get canceled due to time out
- add ```created_by``` column to the job table HOT 1
- Why delete ```success``` jobs? HOT 1
- Support `aeson-2.*` HOT 1
- Failed to build odd-jobs-0.2.2 (type error)
- `cancelJobIO` doesn't work HOT 1
- Backlog: Write test-case for job-deletion configuration option HOT 1
- Make job deletion configurable HOT 5
- Perf: Use PREPARE/EXECUTE for various PG queries
- Use SKIP LOCKED when polling for new jobs? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odd-jobs.