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

Prefer using a strategy factory to set the deduplication strategy per… #54

Merged

Conversation

cborgolte
Copy link
Contributor

… ContentMerger.

Otherwise one deduplication strategy instance is used for all
ContentMerger instances, wich will cause concurrency issues and missing
data, if the strategy has state.

… ContentMerger.

Otherwise one deduplication strategy instance is used for all
ContentMerger instances, wich will cause concurrency issues and missing
data, if the strategy has state.
@cborgolte cborgolte requested a review from domano June 14, 2017 10:46
@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 94.068% when pulling 44baea5 on cborgolte:deduplication-strategy-factory into fa47a3c on tarent:master.

Copy link
Contributor

@domano domano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor naming issues, but not important enough to warrant a merge block. So feel free to merge

@@ -89,7 +89,10 @@ func Test_CompositionHandler_PositiveCaseWithSimpleDeduplicationStrategy(t *test
}
}
ch := NewCompositionHandler(ContentFetcherFactory(contentFetcherFactory))
ch.WithDeduplicationStrategy(new(SimpleDeduplicationStrategy))
sdf := func() StylesheetDeduplicationStrategy {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why sdf? sds would be more fitting (minor issue)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stylesheet deduplication (missing strategy) factory :-)

@@ -42,7 +42,10 @@ func compositionHandler() http.Handler {

return fetcher
}
return composition.NewCompositionHandler(contentFetcherFactory).WithDeduplicationStrategy(new(composition.SimpleDeduplicationStrategy))
sdf := func() composition.StylesheetDeduplicationStrategy {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, why sdf? (minor issues, naming)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 94.068% when pulling e6a34ab on cborgolte:deduplication-strategy-factory into fa47a3c on tarent:master.

@cborgolte cborgolte merged commit 600f57b into qvest-digital:master Jun 14, 2017
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.

None yet

3 participants