-
Notifications
You must be signed in to change notification settings - Fork 476
Fix the IStoreProvider impl. in SpecContext...
#2071
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
Fix the IStoreProvider impl. in SpecContext...
#2071
Conversation
The `SpecificationContext` always belongs to a single spec instance, so it is either the shared `Specification` instance or it belongs to the iteration. There is no `Feature`-level instance, so we don't need to use a stack.
|
What happens on feature level then? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2071 +/- ##
============================================
- Coverage 81.88% 81.87% -0.01%
+ Complexity 4687 4686 -1
============================================
Files 452 452
Lines 14666 14658 -8
Branches 1845 1845
============================================
- Hits 12009 12001 -8
Misses 1976 1976
Partials 681 681
|
|
There is a feature-level store, but you can only access it directly via a feature interceptor. In the spec itself, you can't directly access the feature store. However, the stores are hierarchic, so it will ask its parents if it can't find an item. You can also call |
|
Ah, so in a feature interceptor you have to do On feature-level you currently "could" do So just like you can "again" not get the If I understood it right now, I think the change is fine so far. A protection like for |
|
Hm, actually right now I still wonder how the problem happened and whether there is still something wrong. |
|
Ah, no, there then was the problem that the stack was not thread-safe and the pushes and pops happened on varying threads during parallel execution, all fine without the stack. |
|
Did you see and discard my comment about doc, or missed it? :-) |
The
SpecificationContextalways belongs to a single spec instance,so it is either the shared
Specificationinstance or it belongs tothe iteration. There is no
Feature-level instance, so we don't needto use a stack.