|
1 | 1 | import { AppInsightsSku } from "../../../src/AISku"; |
2 | | -import { ApplicationInsightsContainer } from "../../../src/ApplicationInsightsContainer"; |
3 | | -import { IApplicationInsights } from "../../../src/IApplicationInsights"; |
4 | | -import { Snippet } from "../../../src/Snippet"; |
5 | 2 | import { AITestClass, Assert, IFetchArgs, PollingAssert } from "@microsoft/ai-test-framework"; |
6 | | -import { IConfig, IConfiguration, LoggingSeverity, _eInternalMessageId, IThrottleInterval, IThrottleLimit, IThrottleMgrConfig } from "@microsoft/otel-core-js"; |
7 | | -import { SinonSpy } from "sinon"; |
8 | | -import { createSnippetV5 } from "./testSnippetV5"; |
9 | | -import { CdnFeatureMode, FeatureOptInMode, getGlobal, getGlobalInst, isFunction, newId } from "@microsoft/otel-core-js"; |
10 | | -import { createSnippetV6 } from "./testSnippetV6"; |
| 3 | +import { IConfig, IConfiguration, _eInternalMessageId, IThrottleMgrConfig } from "@microsoft/otel-core-js"; |
| 4 | +import { CdnFeatureMode, FeatureOptInMode, getGlobal, getGlobalInst } from "@microsoft/otel-core-js"; |
11 | 5 | import { CfgSyncPlugin, ICfgSyncConfig, ICfgSyncMode } from "@microsoft/applicationinsights-cfgsync-js"; |
12 | | -import { createSyncPromise, doAwait } from "@nevware21/ts-async"; |
13 | | -import { ICfgSyncCdnConfig } from "@microsoft/applicationinsights-cfgsync-js/src/Interfaces/ICfgSyncCdnConfig"; |
14 | | -const ApplicationInsights = AppInsightsSku; |
| 6 | +import { createSyncPromise } from "@nevware21/ts-async"; |
15 | 7 |
|
16 | 8 |
|
17 | 9 | const TestInstrumentationKey = 'b7170927-2d1c-44f1-acec-59f4e1751c11'; |
@@ -87,11 +79,11 @@ const sampleConfig = { |
87 | 79 |
|
88 | 80 | export class CdnThrottle extends AITestClass { |
89 | 81 | private _ai: AppInsightsSku; |
90 | | - private getAi: ApplicationInsights; |
| 82 | + private getAi: AppInsightsSku; |
91 | 83 | private _config: IConfiguration | IConfig; |
92 | 84 | private identifier: string; |
93 | 85 | private fetchStub: any; |
94 | | - init: ApplicationInsights; |
| 86 | + init: AppInsightsSku; |
95 | 87 | private res: any; |
96 | 88 | private _fetch: any; |
97 | 89 | loggingSpy: any; |
@@ -185,7 +177,7 @@ export class CdnThrottle extends AITestClass { |
185 | 177 | }, 0); |
186 | 178 | }); |
187 | 179 | this.fetchStub = this.sandbox.spy((doc as any), "fetch"); |
188 | | - this.init = new ApplicationInsights({ |
| 180 | + this.init = new AppInsightsSku({ |
189 | 181 | config: { |
190 | 182 | instrumentationKey: TestInstrumentationKey, |
191 | 183 | featureOptIn : {["iKeyUsage"]: {mode: FeatureOptInMode.disable}}, |
@@ -240,7 +232,7 @@ export class CdnThrottle extends AITestClass { |
240 | 232 | }); |
241 | 233 |
|
242 | 234 | this.fetchStub = this.sandbox.spy((doc as any), "fetch"); |
243 | | - this.init = new ApplicationInsights({ |
| 235 | + this.init = new AppInsightsSku({ |
244 | 236 | config: this._config, |
245 | 237 | }); |
246 | 238 | this.init.loadAppInsights(); |
@@ -283,7 +275,7 @@ export class CdnThrottle extends AITestClass { |
283 | 275 | }; |
284 | 276 |
|
285 | 277 | this.fetchStub = this.sandbox.spy((doc as any), "fetch"); |
286 | | - this.init = new ApplicationInsights({ |
| 278 | + this.init = new AppInsightsSku({ |
287 | 279 | config: noSetconfig, |
288 | 280 | }); |
289 | 281 | this.init.loadAppInsights(); |
@@ -341,7 +333,7 @@ export class CdnThrottle extends AITestClass { |
341 | 333 | }} |
342 | 334 | }; |
343 | 335 |
|
344 | | - this.init = new ApplicationInsights({ |
| 336 | + this.init = new AppInsightsSku({ |
345 | 337 | config: config, |
346 | 338 | }); |
347 | 339 | this.init.loadAppInsights(); |
@@ -382,7 +374,7 @@ export class CdnThrottle extends AITestClass { |
382 | 374 | }, 0); |
383 | 375 | }); |
384 | 376 | this.fetchStub = this.sandbox.spy((doc as any), "fetch"); |
385 | | - this.init = new ApplicationInsights({ |
| 377 | + this.init = new AppInsightsSku({ |
386 | 378 | config: { |
387 | 379 | instrumentationKey: TestInstrumentationKey, |
388 | 380 | extensionConfig : {["AppInsightsCfgSyncPlugin"] : { |
@@ -426,7 +418,7 @@ export class CdnThrottle extends AITestClass { |
426 | 418 | }, 0); |
427 | 419 | }); |
428 | 420 | this.fetchStub = this.sandbox.spy((doc as any), "fetch"); |
429 | | - this.init = new ApplicationInsights({ |
| 421 | + this.init = new AppInsightsSku({ |
430 | 422 | config: { |
431 | 423 | instrumentationKey: TestInstrumentationKey, |
432 | 424 | extensionConfig : {["AppInsightsCfgSyncPlugin"] : { |
|
0 commit comments