Skip to content

Fix issue that causes some unit tests not to get executed when run from command line #8

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

Merged
merged 1 commit into from
Mar 24, 2014

Conversation

joeltucci
Copy link
Contributor

Currently there are a lot of unit tests that don't get executed because they do not contain any classes of their own. You can see this by looking in the build report directory. The easiest way to remedy this situation is to just add an @test annotation to the parent class, that will make sure all these tests get executed.

@fge
Copy link
Collaborator

fge commented Mar 20, 2014

Uuuh... OK, I don't get it. All tests run on IDEA, but not on the command line it seems.

But you are right; I viewed the HTML reports and indeed those are missing. I'd have thought that since all operation classes inherited this one, they would "see" the @Test annotations on methods...

So, basically, this is a bug in IDEA?

@joeltucci
Copy link
Contributor Author

I guess it's a case of IDEA being a bit too eager to be "helpful" and does stuff that the command line doesn't. But I guess when in doubt, trust the command line.

@fge
Copy link
Collaborator

fge commented Mar 20, 2014

OK, can you just modify the commit so as to write a more complete commit message? In particular, keep the subject and text separate:

subject here

explanative text here

Thanks!

@joeltucci joeltucci changed the title Added @Test annotation to JsonPatchOperationTest to ensure that all the ... Fix issue that causes some unit tests not to get executed when run from command line Mar 21, 2014
@joeltucci
Copy link
Contributor Author

Ok, I changed the subject. Let me know if you need anything else.

@fge
Copy link
Collaborator

fge commented Mar 21, 2014

Hmm, I don't see any changes? Forgot to push?

Added @test annotation to the JsonPatchOperationTest class so that classes that do not have separate test methods(ie ones that just use the text files to test) will get executed whenever the test suite is run.
@joeltucci
Copy link
Contributor Author

Sorry about that, I pushed the fixed comment.

fge added a commit that referenced this pull request Mar 24, 2014
Fix issue that causes some unit tests not to get executed when run from command line
@fge fge merged commit 20e7144 into java-json-tools:master Mar 24, 2014
@fge
Copy link
Collaborator

fge commented Mar 24, 2014

Thanks!

fge added a commit that referenced this pull request Apr 14, 2014
* Update jackson-coreutils dependency.
* Change license file placement/text.
* Make all tests run from the command line.
* Disable propdeps plugin for the moment.

Francis Galiegue (12):
      Announce 1.5
      Merge pull request #8 from joeltucci/master
      Update gradle wrapper
      Make all tests run from the command line
      gradle file changes
      Update jackson-coreutils dependency
      Licensing text changes
      Update license on all source files
      Remove pom.xml
      Remove obsolete files
      Release note updates
      1.6

Joel L. Tucci (1):
      Fixed issue causing some tests to skip when run from command line
BartekGravity referenced this pull request in gravity9-tech/json-patch-path Jun 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants