michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
249 stars 203 forks source link

Use Spock Framework in tests #110

Closed pwojnowski closed 8 years ago

pwojnowski commented 8 years ago

Hello,

I've written a few tests for quartz-mongodb in Clojure and IMHO it is very inconvenient and limiting compared to Java testing libraries. Basically there are two problems:

  1. Clojure REPL don't see changes in Java code without restart (at least I didn't find a way to do it). When used to test Clojure code it works great and gives fast feedback, but when testing Java code it is very slow and inconvenient.
  2. There's no easy way to create mocks for Java code. I was creating proxies, but it is very limited approach and inconvenient. For example Spock Framework has fantastic support for mocking and thanks to Groovy it is much more convenient for writing tests than JUnit and other Java-based libraries. As part of testing library change it makes sense to change build tool from Leiningen to Maven or Gradle.

IMHO it is important to make testing very easy to do to reduce possibility of errors and enable further development.

Anyway, I can rewrite tests to Spock, but would need to know that it would be accepted to not waste time.

michaelklishin commented 8 years ago

Gradle, Groovy, and Spock are fine with me. Spock is one of my favourite testing tools. That said, I obviously like Leiningen and Clojure but I don't have much time for this project these days. So feel free to move to Gradle and Spock. Thank you.

michaelklishin commented 8 years ago

@pwojnowski I've added you as a collaborator to this repo. Feel free to look into issues, push branches into this repo, and respond to incoming issues and pull requests. You've earned it.

michaelklishin commented 8 years ago

@pwojnowski sorry, any progress or new ideas around this?

pwojnowski commented 8 years ago

Sorry, I couldn't do much recently due to personal issues, but I'm working on it. I'll push it to a branch.

michaelklishin commented 8 years ago

@pwojnowski 👍 . No worries.