Skip to content

Commit

Permalink
Re-use namespace-safe class names in a few tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamessimone committed Oct 31, 2024
1 parent 47449f3 commit a018d1d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions extra-tests/classes/RollupFullRecalcTests.cls
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,12 @@ private class RollupFullRecalcTests {
System.assertEquals(6, acc.AnnualRevenue);
System.assertEquals(
'Completed',
// Namespaces are omitted from the ApexClass Name field so using a strongly typed reference here will fail while packaging otherwise
[SELECT Status, ApexClass.Name FROM AsyncApexJob WHERE JobType = 'Queueable' AND ApexClass.Name = 'RollupFullBatchRecalculator' LIMIT 1]
[
SELECT Status, ApexClass.Name
FROM AsyncApexJob
WHERE JobType = 'Queueable' AND ApexClass.Name = :getNamespaceSafeClassName(RollupFullBatchRecalculator.class)
LIMIT 1
]
?.Status
);
}
Expand Down Expand Up @@ -987,8 +991,7 @@ private class RollupFullRecalcTests {
List<AsyncApexJob> jobs = [
SELECT Status
FROM AsyncApexJob
// Namespaces are omitted from the ApexClass Name field so using a strongly typed reference here will fail while packaging otherwise
WHERE JobType = 'Queueable' AND ApexClass.Name = 'RollupFullBatchRecalculator'
WHERE JobType = 'Queueable' AND ApexClass.Name = :getNamespaceSafeClassName(RollupFullBatchRecalculator.class)
];
System.assertEquals(false, jobs.isEmpty());
for (AsyncApexJob job : jobs) {
Expand Down

0 comments on commit a018d1d

Please sign in to comment.