Comments (13)
Setting the CurrencyIsoCode = 'USD' when the account data is created in the test fixed the issue for me
List accountList = new List
{
new Account(Name='TestAccount2',AccountNumber='A2',AnnualRevenue=12345.67, CurrencyIsoCode = 'USD'),
new Account(Name='TestAccount1',AccountNumber='A1',AnnualRevenue=76543.21, CurrencyIsoCode = 'USD')
};
from fflib-apex-common.
Thanks for the update @adayIvey. Glad to hear that you were able to resolve your issue. Cheers!
from fflib-apex-common.
While I did resolve my issue I think the test should be updated to include a currency code when creating Account Data
from fflib-apex-common.
Sounds like a reasonable and simple test improvement that would shield users from a nuisance test failure.
from fflib-apex-common.
Hi @adayIvey,
I'm having difficulty reproducing your issue. Would you, please, send me a screenshot of your Manage Currencies page so that I recreate that in a scratch org?
from fflib-apex-common.
from fflib-apex-common.
Hi again @adayIvey,
For some reason, your reply came through unreadable. Here's what I see on the Github site.
from fflib-apex-common.
![image](https://private-user-images.githubusercontent.com/15614803/339502509-45c0465b-8eb4-473e-a31f-14dead495d59.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNjQ5OTcsIm5iZiI6MTcyMTI2NDY5NywicGF0aCI6Ii8xNTYxNDgwMy8zMzk1MDI1MDktNDVjMDQ2NWItOGViNC00NzNlLWEzMWYtMTRkZWFkNDk1ZDU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE4VDAxMDQ1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzMTU0ODM4ZjJmNzA2NjRhMWVlZGEzZGM0YWJiMWQ3OTBhYzI5MTA2YjIzY2RjM2NmYzM4MTY1YjA0OGFmNzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HCgpDBcyxRWd71tANPXawcr5LUaJbs9h49JYHSt8JXU)
![image](https://private-user-images.githubusercontent.com/15614803/339502716-9c4bcc3f-7805-4040-9275-34eca7092389.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNjQ5OTcsIm5iZiI6MTcyMTI2NDY5NywicGF0aCI6Ii8xNTYxNDgwMy8zMzk1MDI3MTYtOWM0YmNjM2YtNzgwNS00MDQwLTkyNzUtMzRlY2E3MDkyMzg5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE4VDAxMDQ1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzODQyNGFjMzY1ZWNhMjk1NjQzMTFjNzBlZTA3NTZlNTkzMzMzMjdmNmEzOGYwNjQ5NDRiY2JjM2U2MWRiYmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.f_oMZPKaz7I9rjQwzk5ekXrkBOkLFeNT0cgDNe5BMz4)
from fflib-apex-common.
@adayIvey
I created a scratch org from this project's multi-currency definition and configured as depicted above, yet all FFLIB tests complete and pass.
Are there other multicurrency configurations that might help me to reproduce the issue that you're seeing? It's obvious you're experiencing something; we just need to identify the culprit for reproducibility.
Thanks!
from fflib-apex-common.
sorry for the late reply but tbh I am not sure what else I can say to help
but I did just try deploying into our production org from github and I get this error
`Status: Completed
Deployment CompleteTest failure, method: fflib_SObjectSelectorTest.testQueryLocatorById -- System.AssertException: Assertion Failed: Expected: 12345.67, Actual: 9038.49 stack Class.fflib_SObjectSelectorTest.testQueryLocatorById: line 88, column 1
Test failure, method: fflib_SObjectSelectorTest.testSelectSObjectsById -- System.AssertException: Assertion Failed: Expected: 12345.67, Actual: 9038.49 stack Class.fflib_SObjectSelectorTest.testSelectSObjectsById: line 61, column 1
labels/CustomLabels.labels`
to get around this I want to try and deploy it manually from from a sandbox where I have updated the test that is causing me issues and I have tried using changesets or vscode and I get issues. Is there a specific way I need to deploy these files (I have already deployed the Apex Mocks classes)
from fflib-apex-common.
@adayIvey
I have all confidence that something is causing an incompatibility with FFLIB in your orgs, but I can't condone a presumptive fix without an ability to reproduce the error and attribute it to a shortcoming in FFLIB. Again, I'm happy to pursue this further with more information. With that said, I'll take your latest screenshot and further attempt to reproduce the issue, especially with the corporate currency being the Canadian Dollar.
Aye? 😁
from fflib-apex-common.
thanks, if you have any ideas on additional info I can provide I will just ask
from fflib-apex-common.
@adayIvey,
If you're adept with scratch orgs, the best path would be determining the key configuration facet, from your SF environments, that causes that unit test to fail in one of this repo's multi-currency scratch orgs. Otherwise, further progress will likely be delayed pending my availability to experiment further.
from fflib-apex-common.
Related Issues (20)
- Unit test failure in multi-currency org HOT 4
- Deploy button doesn't deploy because there are test failures HOT 1
- Expected a QueryException due to read only user not having access to Opportunity HOT 7
- Switch to Inherited Sharing on SObjectDescribe and SObjectSelector HOT 2
- With latest fflib, do TriggerHandlers become service class consumers? If so what happens to UoW? HOT 6
- Selected tests in fflib_SObjectSelectorTest fail in an org with encryption enabled on Account.Name HOT 2
- Selector Mocks to Include SOQL Query Retrieve Check HOT 1
- fflib_SObjectUnitOfWork doCommitWork executes all dml for all registered types even if there are no changes
- Update README as session recordings are not available HOT 2
- fflib_SObjectDescribe.cls fails to resolve cross-object field paths for Person Accounts
- Aggregate SOQL support. HOT 2
- Disable Savepoint in tests HOT 4
- Inconsistent Code Coverage and Test Failures in fflib-apex-common HOT 1
- fflib_SObjectSelector and fflib_SObjectUnitOfWork have insufficient test code coverage. HOT 2
- Add queryWithBinds to Selector layer HOT 2
- Unit test failing fflib_SecurityUtilsTest & sysadmin_objectAndField_access HOT 8
- Coverage of UnitOfWork class HOT 1
- Versioning HOT 1
- fflib_SObjectSelectorTest failure with Lookup relationship and Person Type Accounts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fflib-apex-common.