-
Notifications
You must be signed in to change notification settings - Fork 351
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
Cashflow example and rule retraction #268
Comments
…e same knowledgebase instance, the rule entries are not resetted as intended.
This is really odd, and strangely afterall this time, this never caught by anybody. Thanks a lot @mgilbir . I've made an adjustment in my branch, and its ok now. About to PR it. |
* Fixed issue #268 where everytime engine execute using the same knowledgebase instance, the rule entries are not resetted as intended. * Addjust pipeline to run golint * I temporary removed golint in the test, need to figure out how pipeline install golint into GOBIN
Fixed in new release https://github.com/hyperjumptech/grule-rule-engine/releases/tag/v1.10.3 |
Confirmed that it works now. Thanks for the quick fix! |
Describe the bug
When I run the cashflow example the result doesn't reflect what logically the test example is trying to showcase: that you can have another object to accumulate output from multiple runs.
When the
SumUpPurchase
rule is retracted, it is effectively forcing that only the first purchase is accumulated in theCashFlow
object.To Reproduce
Run
go test examples -run TestCashFlowCalculator_CalculatePurchases -v
There are 11 purchases passed but the cashflow object string output that is the test result shows:
Expected behavior
The cashflow object to reflect the multiple purchases that have been processed.
The text was updated successfully, but these errors were encountered: