function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bretondevbretondev 

Half of our test classes fail because of a strange S2XUserMap object

Hello Community

Since a few days, half of our Apex Test Classes fail in our Sandbox environment.
The strange thing is that we did not do any modifications on these classes.

The error message we get is :
"System.DmlException: Update failed. First exception on row 0 with id 0QL6E0000002O2MWAU; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): QuoteLineItem, original object: S2XUserMap: []"

Note 1:
We have found an issue on the Salesforce Known Issues website, but it dates from Winter 18 :
https://success.salesforce.com/issues_view?id=a1p3A0000008gVyQAI

Note 2 :
We only get the failures when we run the tests from the Developer Console.
When we push a Change Set to the sandbox and validate it by running Local Tests, all the tests succeed.

Note 3:
We have the same Test Classes in another Sandbox and our Production environment, and here all tests succeed.

Note 4:
We haven't touched some of those test classes for more than a year.

Note 5:
We don't know where that "S2XUserMap" object comes from.
We have never seen it in the past.

User-added image