|
27 | 27 | import com.microsoft.applicationinsights.TelemetryConfiguration; |
28 | 28 | import com.microsoft.applicationinsights.channel.TelemetryChannel; |
29 | 29 | import com.microsoft.applicationinsights.channel.concrete.inprocess.InProcessTelemetryChannel; |
30 | | -import com.microsoft.applicationinsights.channel.concrete.localforwarder.LocalForwarderTelemetryChannel; |
31 | 30 | import com.microsoft.applicationinsights.exceptions.IllegalConfigurationException; |
32 | 31 | import com.microsoft.applicationinsights.extensibility.ContextInitializer; |
33 | 32 | import com.microsoft.applicationinsights.extensibility.TelemetryInitializer; |
@@ -187,34 +186,6 @@ public void shouldBeAbleToConfigureInprocessTelemetryChannel() throws IllegalCon |
187 | 186 | assertThat(channel).extracting("telemetryBuffer").extracting("maxTelemetriesInBatch").contains(10); |
188 | 187 | } |
189 | 188 |
|
190 | | - @Test |
191 | | - public void shouldBeAbleToConfigureLocalForwarderTelemetryChannel() throws IllegalConfigurationException { |
192 | | - EnvironmentTestUtils.addEnvironment(context, |
193 | | - "azure.application-insights.instrumentation-key: 00000000-0000-0000-0000-000000000000", |
194 | | - "azure.application-insights.channel.local-forwarder.endpoint-address=localhost:8080"); |
195 | | - context.register(PropertyPlaceholderAutoConfiguration.class, |
196 | | - ApplicationInsightsTelemetryAutoConfiguration.class); |
197 | | - context.refresh(); |
198 | | - |
199 | | - TelemetryConfiguration telemetryConfiguration = context.getBean(TelemetryConfiguration.class); |
200 | | - TelemetryChannel channel = telemetryConfiguration.getChannel(); |
201 | | - |
202 | | - assertThat(channel).isInstanceOf(LocalForwarderTelemetryChannel.class); |
203 | | - } |
204 | | - |
205 | | - @Test |
206 | | - public void shouldThrowExceptionWhenChannelsMisconfigured() { |
207 | | - |
208 | | - EnvironmentTestUtils.addEnvironment(context, |
209 | | - "azure.application-insights.instrumentation-key: 00000000-0000-0000-0000-000000000000", |
210 | | - "azure.application-insights.channel.local-forwarder.endpoint-address=localhost:8080", |
211 | | - "azure.application-insights.channel.in-process.endpoint-address=https://dc.services.visualstudio.com/v2/track"); |
212 | | - context.register(PropertyPlaceholderAutoConfiguration.class, ApplicationInsightsTelemetryAutoConfiguration.class); |
213 | | - thrown.expect(BeanCreationException.class); |
214 | | - context.refresh(); |
215 | | - } |
216 | | - |
217 | | - |
218 | 189 | @Test |
219 | 190 | public void shouldBeAbleToConfigureSamplingTelemetryProcessor() { |
220 | 191 | EnvironmentTestUtils.addEnvironment(context, |
@@ -248,8 +219,7 @@ public void shouldBeAbleToDisableAllWebModules() { |
248 | 219 | } |
249 | 220 |
|
250 | 221 | @Test |
251 | | - public void internalLoggerShouldBeInitializedBeforeTelemetryConfiguration() throws Exception { |
252 | | - resetInternalLogger(); |
| 222 | + public void internalLoggerShouldBeInitializedBeforeTelemetryConfiguration() { |
253 | 223 | EnvironmentTestUtils.addEnvironment(context, |
254 | 224 | "azure.application-insights.instrumentation-key: 00000000-0000-0000-0000-000000000000", |
255 | 225 | "azure.application-insights.logger.level=INFO" |
@@ -336,22 +306,6 @@ public void heartBeatModuleShouldBeEnabledByDefault() { |
336 | 306 | assertThat(context.getBeansOfType(HeartBeatModule.class)).isNotEmpty(); |
337 | 307 | } |
338 | 308 |
|
339 | | - @Test |
340 | | - public void shouldNotHaveQuickPulseChannelIfLFPresent() throws Exception { |
341 | | - resetQuickPulse(); |
342 | | - EnvironmentTestUtils.addEnvironment(context, |
343 | | - "azure.application-insights.instrumentation-key: 00000000-0000-0000-0000-000000000000", |
344 | | - "azure.application-insights.channel.local-forwarder.endpoint-address=localhost:8080"); |
345 | | - |
346 | | - context.register(PropertyPlaceholderAutoConfiguration.class, |
347 | | - ApplicationInsightsTelemetryAutoConfiguration.class); |
348 | | - context.refresh(); |
349 | | - |
350 | | - QuickPulse instance = context.getBean(QuickPulse.class); |
351 | | - assertThat(instance).extracting("initialized").contains(false); |
352 | | - |
353 | | - } |
354 | | - |
355 | 309 | private void testIkeySystemProperty(String propertyName) { |
356 | 310 | System.setProperty(propertyName, "00000000-0000-0000-0000-000000000001"); |
357 | 311 | context.register(PropertyPlaceholderAutoConfiguration.class, |
|
0 commit comments