Merged
Conversation
added 30 commits
February 26, 2019 14:17
# Conflicts: # CHANGELOG.md # core/cleaner/src/test/java/com/cognifide/aet/cleaner/processors/filters/SuiteRemoveConditionTest.java
Contributor
|
Good job! |
plutasnyy
approved these changes
Mar 8, 2019
tkaik
reviewed
Mar 11, 2019
|
|
||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> |
Contributor
There was a problem hiding this comment.
If those are dependencies only for tests then we should probably add<scope>test</scope>
…' into feature/cleaner-integration-test
…e/cleaner-integration-test
…e/cleaner-integration-test
malaskowski
reviewed
Jul 7, 2019
| </parent> | ||
|
|
||
| <artifactId>cleaner-test</artifactId> | ||
| <packaging>jar</packaging> |
Contributor
There was a problem hiding this comment.
Wy do we need jar distribution of this module?
It is only for tests.
Contributor
There was a problem hiding this comment.
Yes, if we set it to pom then the tests are not being compiled or executed
| import org.apache.commons.io.FileUtils; | ||
| import org.bson.Document; | ||
|
|
||
| public class InMemoryDB { |
Contributor
There was a problem hiding this comment.
Shouldn't all files in this module be in src/test?
Why do we need any of the code to be non-test?
Contributor
There was a problem hiding this comment.
You're right, I moved all files to src/test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added cleaner integration tests as suggested in #441
Description
My solution uses a mocked osgi context as well as in-memory mock of mongoDB server. It checks various combinations of cleaner params (versions to keep and suite max age) and verifies whether correct metadata and artifacts documents have been removed from database.
For testing data I used real json objects extracted from my local aet instance db after a couple of runs (with some timestamp changes).
To make testing possible I had to incorporate some changes in cleaner code. This includes
LocalDateTimeProviderinterface to mock current system time andCamelContextCreatorto inject different camel context configuration during testing and normal execution.Motivation and Context
Refers to enhancement brought up in #441
Types of changes
Checklist:
I hereby agree to the terms of the AET Contributor License Agreement.