Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix quickpulse url construction. #1090

Merged
merged 3 commits into from
Oct 14, 2019
Merged

Conversation

littleaj
Copy link
Contributor

@littleaj littleaj commented Oct 7, 2019

add tests to verify.

Fix #1089

add tests to verify.
@littleaj littleaj added this to the 2.5.1-BETA.2 milestone Oct 7, 2019
@littleaj littleaj requested a review from trask October 7, 2019 22:54
@littleaj littleaj self-assigned this Oct 7, 2019
@littleaj
Copy link
Contributor Author

littleaj commented Oct 8, 2019

@trask, I had to make quite a few changes to prevent static variable values from bleeding into other tests which were causing failures. Ping me if you want me to go through the details.

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the tests! Just comments about Intellij formatting below.

import org.junit.BeforeClass;
import org.junit.Test;

import org.junit.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you change Intellij settings? I think default is 99 imports before it uses '*'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. For tests, I allow * for org.junit, org.hamcrest and org.mockito and there are a few static ones too, e.g. org.junit.Assert.*. For prod code, I prefer to be explicit. For tests I like the splats for the test framework classes. Intellisense is usually quicker/better with its suggestions.

I think the checkstyle settings reflect this, but maybe not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you configure this differently in Intellij for test vs prod?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can. I have the count settings set to 500 (default is 99 but that didn't always work for me), plus rules for org.junit, Mockito, Matchers and Assert which always use *. These settings are under Editor/Code Style/Java/Imports

import org.junit.Before;
import org.junit.Test;

import org.junit.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here re: Intellij settings

@@ -1,11 +1,15 @@
package com.microsoft.applicationinsights.internal.quickpulse;

import com.microsoft.applicationinsights.TelemetryConfiguration;
import org.junit.Assert;
import org.junit.Test;
import org.junit.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here re: Intellij settings

@littleaj littleaj merged commit 022093b into master Oct 14, 2019
@littleaj littleaj deleted the littleaj/fix_qp_endpoint_builder branch October 14, 2019 21:46
trask added a commit that referenced this pull request Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuickPulse regression in 2.5.1-beta
2 participants