単体テストによって ccsl.cc_CallContext.getConfigValue へのコールが多数行われると、モック構成設定データがテストメソッドに挿入されていない場合、Apex 例外「Too many SOQL queries: 101」 (SOQL クエリが多すぎます: 101) で失敗します。
ccApiTestData.setupData がコールされると、データは 1 回のトランザクションでのみ有効になります。@TestSetup メソッド中に setupData メソッドがコールされた場合、構成を取得するために用意されているメモリ内ガードがリセットされ、cclder.ccall.cc_CallContext.getConfigValue へのすべてのコールの IsTest がアノテーションされたメソッドで冗長 SOQL が実行されます。
1.個々の @isTest がアノテーションされたメソッドで ccdw.ccApiTestData.setupData がコールされることを確認します。
2.バージョンが 4.13 (4.139) 以降の場合、ccdw.CCApiTestData.CONFIG_SETTINGS にデータを入力します。特定のデータが不要な場合でも、ccApiTestData.setupData への呼び出しの一部としてモック構成設定を含める必要があります。Map<String, Object> configSettingMock = new Map<String, Object> { 'safe' => 'default' };ccrz.ccApiTestData.setupData(new Map<String,Map<String,Object>> { ccrz.CCApiTestData.CONFIG_SETTINGS => configSettingMock};
000395910

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.