-
Notifications
You must be signed in to change notification settings - Fork 520
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
Task_Chatter_Tst Test case failed w/This user cannot follow any other users or records #51
Comments
Seem like two different issues. #22 is about the 500 record following limit (still 500?). This appears to be that a user can follow anything, let alone more. @brountre is this a real user or one created during testin? Is it a clean dev org or was it populated? I ask b/c i 'm not able to reproduce in a clean org. |
Haven't seen this error come up either in a couple of installs. Crazy question: is Chatter enabled in the org? |
Interestingly if I disable chatter the test passes. On Tue, Jan 24, 2012 at 8:49 AM, Tom Patros <
|
The user is the admin user. It isn't a clean org, it had several classes Thanks, On Tue, Jan 24, 2012 at 7:34 AM, ReidCarlberg <
|
We're you able to reproduce in a new org? |
No, when I created a new dev org. The test failures went away. I'm Thanks for the follow up. Bryan
|
Hi Reid, I am also experiencing this problem. Getting When I disable Chatter it runs fine, but when enabled, I get the above. Now when trying to deploy anything else, this is stopping me from deploying my code as I can no longer disable Chatter in production. Any advice on this? |
I encountered the exact problem as dostal76 above. System.DmlException: Update failed. First exception on row 0 with id a0i40000000wDpxAAE; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, This user cannot follow any other users or records: []: [] Class.Milestone1_Task_Chatter_Tst.testChatterTaskReassignment: line 95, column 1 Pasting the code below: EntitySubscription subscription = [Select Id, ParentId, SubscriberId from EntitySubscription where ParentId =: testTask.Id]; This is also blocking us from deploying a new application. Any advice would be highly appreciated. |
What's the sharing model on Milestone1_Milestone__c? |
Reid, How to look that up? |
If you are referring to "API Name Milestone1_Milestone__c", then there isn't Apex Sharing Reasons or Apex Sharing Recalculation. Milestone PM has been deployed and in production for 3-4 months without issues. During deployment I remember checking the "ignore error" option. We have recently deployed another application successfully. So only now the test is blocking us from deploying a new class and a page. Is there any workaround that we can deactivate this test? edit and comment out the offending lines? |
You can definitely edit the test. What version do you have installed? Current is 1.51 |
I don't see there is an "edit" option in production. Version is 1.53, deployed 10/28/2011 to be exact. How should I proceed? Please advise. |
You won't have an edit in prod. Needs to be in the sandbox. Should be able to edit in sandbox and push over. Alternatively, if you don't have a sandbox, you could push from a dev edition. |
Interesting, the same test passed in Sandbox. This makes me thinking that it has something to do with data limit. I commented out the "assert" line in Sandbox and put the class in a changeset. But it got blocked when validating in production. How to override the one in production? This is the first time we deploy in-house developed application in SF, so apologize ahead for asking SF questions here. |
This is what I ultimately did to remove the test failure in production:
a. commented out these two lines: b. Changed this line actual from 0 to 1. Save to server. The test passed, 52% coverage. |
Cool. Are you up and running now? |
Yes. At least now there is a way to update classes in Production. I'll spend sometime to look into the error once this deployment is all done. If there is anything I'll let you know. Thanks for the app. It's really nice. |
we are running the Managed Package version 1.57 and are getting the same test failure in our sandbox. LABSMPM.Milestone1_Task_Chatter_Tst.testChatterTaskReassignment 512.0 System.DmlException: Update failed. First exception on row 0 with id a0kV0000000MFcwIAG; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, This user cannot follow any other users or records: []: [] Schedule to try this installation into our production org this week. Is there a way I can update the managed package to verify it will install and not block other change set deployments? |
April 2012 Milestone work-- ensure the code isn't selecting a random user. That's guaranteed to be a flapper test. Replace the code that is selecting a random user with code that is creating a specific type of user. Example of error in Partner Dev org -- https://skitch.com/reidcarlberg/8u1ig/salesforce.com-developer-edition -- this is after install, with simple initialization and then a run all tests from the Apex Classes screen. Here's the offending code -- it's basically just grabbing any old user (in this case it get's a portal user) and should create a new test user instead. Add this code to the Milestone1 Test Utilities class and use it to create users instead. https://github.com/ForceDotComLabs/ActionPlans/blob/master/src/classes/ActionPlansTestUtilities.cls
|
I am also having issues with these errors. I replicated @fengxia41103 fixes, but now I am receiving different errors: Failure Message: "System.QueryException: invalid ID field: null", Failure Stack Trace: "Class.Milestone1_Task_Chatter_Tst.testChatterTaskFollows: line 50, column 1" I am also receiving the following error that I would not know how to address: Failure Message: "System.AssertException: Assertion Failed: Expected: 3418.99000000000000000000000000000000000196, Actual: 3418.990000000000000000000000000000000003", Failure Stack Trace: "Class.Milestone1_Test_Field_Values.testFieldValues: line 278, column 1" I've done both editing the classes in my Sandbox as well as in the Force.com IDE and attempting to deploy to production, but to no avail. I really want to get these resolved as it is holding up some changes I'm looking to add to my production. Thanks |
Installed Milestone PM into a developer org, getting the following error on Milestone1_Tasks_Chatter_Tst method testChatterTaskReassignment (Line 96)
System.DmlException: Update failed. First exception on row 0 with id a0TF0000003aXycMAE; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, This user cannot follow any other users or records: []: []
The text was updated successfully, but these errors were encountered: