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

Move test involving embedded database to an integration test project and mock in unit tests #146

Closed
krichter722 opened this issue Mar 26, 2015 · 4 comments

Comments

@krichter722
Copy link
Contributor

Unit tests shouldn't open sockets and start embedded database servers. That's integration testing. Afaik that's done in separate -it projects in maven. The existing tests which are in fact integration tests should be moved to such a project. Unit tests should use mocks.

There's the orienteer-archetype-war project whose meaning I don't fully understand. It executes integration tests which run even if -DskipTests=true is specified as maven option (might be a separate issue).

@PhantomYdn
Copy link
Member

Let me partially disagree with you. Tests are directly related to working with OrientDB and they are organized in pretty much the same way as tests in OrientDB themself. If you have concern about opening sockets: that might be disabled in orienteer-test.properties

@krichter722
Copy link
Contributor Author

Let me partially disagree with you. Tests are directly related to working with OrientDB and they are organized in pretty much the same way as tests in OrientDB themself. If you have concern about opening sockets: that might be disabled in orienteer-test.properties

Noted.

I guess it's just TestMyWebApplication.java in orienteer-archetype-war which takes for ever and isn't controlled with -DskipTests=true. That should be changed, right?

@PhantomYdn
Copy link
Member

I see what do you mean... orienteer-archetype-war is maven archetype for quick bootstraping of new projects on top of Orienteer. https://maven.apache.org/guides/introduction/introduction-to-archetypes.html
And for now I set -DskipTests=false for running packaging of this archetype just to be sure that archetype build is correct. If can find a way how to pass "skipTests" from parent maven process to child one: please let me know.

If you don't want to build everything on every small change: I recommend to work just within orienteer-core. And btw, it's possible to run "mvn clean jetty:run" for this jar project.

@PhantomYdn
Copy link
Member

It's possible to use -DskipITs

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

2 participants