Skip to content

Commit 8f295b1

Browse files
chore: try awaiting SO provisioning
1 parent 677602d commit 8f295b1

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

test/nuts/agent.generate.authoring-bundle.nut.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ import { expect } from 'chai';
2020
import { genUniqueString, TestSession } from '@salesforce/cli-plugins-testkit';
2121
import { execCmd } from '@salesforce/cli-plugins-testkit';
2222
import { Org, User } from '@salesforce/core';
23+
import { sleep } from '@salesforce/kit';
2324
import type { AgentGenerateAuthoringBundleResult } from '../../src/commands/agent/generate/authoring-bundle.js';
2425

26+
/* eslint-disable no-console */
27+
2528
let session: TestSession;
2629

2730
describe('agent generate authoring-bundle NUTs', () => {
@@ -48,6 +51,10 @@ describe('agent generate authoring-bundle NUTs', () => {
4851
);
4952
const user = await User.create({ org: defaultOrg });
5053
await user.assignPermissionSets(queryResult.Id, ['EinsteinGPTPromptTemplateManager', 'ExecutePromptTemplates']);
54+
55+
// wait for the agent to be provisioned
56+
console.log('\nWaiting 4 minutes for agent provisioning...\n');
57+
await sleep(240_000);
5158
});
5259

5360
after(async () => {

test/nuts/agent.publish.nut.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ import { expect } from 'chai';
1919
import { TestSession } from '@salesforce/cli-plugins-testkit';
2020
import { execCmd } from '@salesforce/cli-plugins-testkit';
2121
import { Org, User } from '@salesforce/core';
22+
import { sleep } from '@salesforce/kit';
2223
import type { AgentPublishAuthoringBundleResult } from '../../src/commands/agent/publish/authoring-bundle.js';
2324

25+
/* eslint-disable no-console */
26+
2427
describe('agent publish authoring-bundle NUTs', () => {
2528
let session: TestSession;
2629

@@ -48,6 +51,9 @@ describe('agent publish authoring-bundle NUTs', () => {
4851
const user = await User.create({ org: defaultOrg });
4952
await user.assignPermissionSets(queryResult.Id, ['EinsteinGPTPromptTemplateManager', 'ExecutePromptTemplates']);
5053

54+
// wait for the agent to be provisioned
55+
console.log('\nWaiting 4 minutes for agent provisioning...\n');
56+
await sleep(240_000);
5157
// Rename valid.xml to valid.bundle-meta.xml for the publish test
5258
const validXmlPath = join(
5359
session.project.dir,

test/nuts/agent.validate.nut.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ import { expect } from 'chai';
1919
import { TestSession } from '@salesforce/cli-plugins-testkit';
2020
import { execCmd } from '@salesforce/cli-plugins-testkit';
2121
import { Org, User } from '@salesforce/core';
22+
import { sleep } from '@salesforce/kit';
2223
import type { AgentValidateAuthoringBundleResult } from '../../src/commands/agent/validate/authoring-bundle.js';
2324

25+
/* eslint-disable no-console */
26+
2427
describe('agent validate authoring-bundle NUTs', () => {
2528
let session: TestSession;
2629

@@ -48,6 +51,9 @@ describe('agent validate authoring-bundle NUTs', () => {
4851
const user = await User.create({ org: defaultOrg });
4952
await user.assignPermissionSets(queryResult.Id, ['EinsteinGPTPromptTemplateManager', 'ExecutePromptTemplates']);
5053

54+
// wait for the agent to be provisioned
55+
console.log('\nWaiting 4 minutes for agent provisioning...\n');
56+
await sleep(240_000);
5157
// Rename .xml files to .bundle-meta.xml for the validate test
5258
const validXmlPath = join(
5359
session.project.dir,

0 commit comments

Comments
 (0)