Skip to content

Refactor and Test server core query package#2713

Closed
flycash wants to merge 14 commits intoapache:masterfrom
flycash:test-server-core-query
Closed

Refactor and Test server core query package#2713
flycash wants to merge 14 commits intoapache:masterfrom
flycash:test-server-core-query

Conversation

@flycash
Copy link
Member

@flycash flycash commented May 19, 2019

Add unit test for org.apache.skywalking.oap.server.core.query package

  • Why submit this pull request?

  • Bug fix

  • New feature provided

  • Improve performance

  • Related issues


Bug fix

  • Bug description.

  • How to fix?


New feature or improvement

  • Describe the details and related test reports.

@wu-sheng
Copy link
Member

#2654 is planned to be merged after UI updated. I prefer you could adopt that after merged.

@wu-sheng wu-sheng added TBD To be decided later, need more discussion or input. test Test requirements about performance, feature or before release. labels May 19, 2019
@flycash
Copy link
Member Author

flycash commented May 19, 2019

okay

@wu-sheng
Copy link
Member

#2654 merged. Please update this pull request.

@flycash flycash force-pushed the test-server-core-query branch 3 times, most recently from 5d8fc58 to 877d478 Compare May 22, 2019 15:13
@flycash flycash force-pushed the test-server-core-query branch 2 times, most recently from a291286 to 8224590 Compare May 24, 2019 13:16
@flycash flycash force-pushed the test-server-core-query branch from 8224590 to bfe1bb9 Compare May 24, 2019 13:41
Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

FYI @IanCao @JaredTan95 This ps is a little hard to review, needs to test in local env.

@wu-sheng
Copy link
Member

Also, this title doesn't fit the PR very well. This PR includes a lot of refactors to codes.

@flycash flycash changed the title Test server core query Refactor and Test server core query package May 24, 2019
@coveralls
Copy link

Coverage Status

Coverage increased (+1.8%) to 18.613% when pulling 8224590ce7966c173798129a4dc858c5494cc389 on flycash:test-server-core-query into 1530a66 on apache:master.

@coveralls
Copy link

coveralls commented May 24, 2019

Coverage Status

Coverage increased (+1.8%) to 18.652% when pulling a2e874d8fc2bee2641e54d4b91efa74e1c24cf6f on flycash:test-server-core-query into e0827e3 on apache:master.

@wu-sheng wu-sheng requested a review from JaredTan95 May 25, 2019 05:40
@wu-sheng wu-sheng added feature New feature backend OAP backend related. and removed TBD To be decided later, need more discussion or input. labels May 25, 2019
@wu-sheng wu-sheng added this to the 6.2.0 milestone May 25, 2019
Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

inline.

Copy link
Member

Choose a reason for hiding this comment

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

I think we need comments of which is the mock topology. Put them in the AbstractTopologyTest comments. And use logic variable name as static attribute/field to replace the numbers in assertTopology, mockClientCall , mockServerCall.

Copy link
Member

Choose a reason for hiding this comment

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

Also mapping means client and server sides have agents, so the client -> peer could be translated to client -> server. So, I need to describe the topology clear. Otherwise, it is hard to say that, your test cases are right and scenarios coveraged.

Copy link
Member

Choose a reason for hiding this comment

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

We need a tearDown to clear ValueColumnIds.INSTANCE, right?

Copy link
Member

Choose a reason for hiding this comment

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

typo, expecteName -> expectedName

Copy link
Member

Choose a reason for hiding this comment

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

The name should come from mock inventory, right? You put a name here without any comment, make reader very hard to understand. Suggest you put a comment,

Mock the entity name. This name should be replaced by mock inventory.

Copy link
Member

Choose a reason for hiding this comment

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

Why put the DATE_STR in this format? It is not clear.

Copy link
Member

Choose a reason for hiding this comment

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

Remove useless codes.

Copy link
Member

Choose a reason for hiding this comment

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

Please follow the above review and make this assert clearer.

Copy link
Member

Choose a reason for hiding this comment

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

assertNode is very hard to understand. Please use logic name to replace numbers.

@flycash
Copy link
Member Author

flycash commented May 26, 2019

I would add the comments but it would take some time due to my terrible English.

@wu-sheng
Copy link
Member

Take your time. I could help you with English when you have a draft, and make the test codes more readable.

@wu-sheng wu-sheng removed this from the 6.2.0 milestone May 31, 2019
@flycash flycash force-pushed the test-server-core-query branch from a2e874d to 7019816 Compare June 1, 2019 14:28
@flycash flycash closed this Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. feature New feature test Test requirements about performance, feature or before release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants