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

Added support of @MeterTag annotation on method level #5827

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarinaMoiseenko
Copy link
Contributor

Fixes #3058

re-created pr with new branch, as failed to rebase initial one

Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

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

Looks good to me. I left some minor review comments we can probably handle as polish when merging.

throw e;
}
}

private void recordCompletionResult(ProceedingJoinPoint pjp, Counted counted, Throwable throwable) {
private void recordCompletionResult(ProceedingJoinPoint pjp, Object methodResult, Counted counted,
Copy link
Member

Choose a reason for hiding this comment

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

We should mark the methodResult as @Nullable.

void meterTagsOnReturnValueWithText(AnnotatedTestClass annotatedClass) {
MeterTagClassInterface service = getProxyWithCountedAspect(annotatedClass.newInstance());

service.getAnnotationForArgumentToString();
Copy link
Member

Choose a reason for hiding this comment

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

The method name doesn't match what's being tested - it's confusing (at least to me). Perhaps something like getAnnotationForReturnValueToString would be more clear.

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.

Allow injecting a function into TimedAspect to create tags based on method result
2 participants