Skip to content

Added Interceptor for unary & server streaming gRPC calls#655

Merged
baev merged 8 commits into
allure-framework:masterfrom
dtuchs:dtuchs/grpc
May 4, 2022
Merged

Added Interceptor for unary & server streaming gRPC calls#655
baev merged 8 commits into
allure-framework:masterfrom
dtuchs:dtuchs/grpc

Conversation

@dtuchs
Copy link
Copy Markdown

@dtuchs dtuchs commented Sep 16, 2021

Снимок экрана 2021-09-16 в 16 45 38

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 16, 2021

CLA assistant check
All committers have signed the CLA.

@a-simeshin
Copy link
Copy Markdown
Contributor

I really like the idea of server interceptor with pretty printing. Should we merge our pull requests into one (my own is for client #646 ) ?
That would be surely nice AIO allure extensions pack for gRPC

  • server interceptor for unit tests
  • client interceptor for integration tests

Comment thread allure-grpc/src/main/resources/tpl/grpc-request.ftl Outdated
Comment thread allure-grpc/src/main/java/io/qameta/allure/grpc/AllureGrpc.java Outdated
Comment thread allure-grpc/src/main/java/io/qameta/allure/grpc/AllureGrpc.java
Comment thread allure-grpc/src/main/java/io/qameta/allure/grpc/AllureGrpc.java Outdated
@a-simeshin
Copy link
Copy Markdown
Contributor

a-simeshin commented Sep 25, 2021

@baev Could you be so kind to review this one? Then I`ll update my own #646 after merge this

Comment thread build.gradle.kts
dependency("org.jboss.resteasy:resteasy-client:4.7.1.Final")
dependency("org.mock-server:mockserver-netty:5.11.2")
dependency("org.mockito:mockito-core:3.12.4")
dependency("javax.annotation:javax.annotation-api:1.3.1")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have not found any usages for the annotations from this dependency. Is this dependency really needed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is the standard workaround for JDK 9+ (grpc/grpc-java#3633)
unfortunately the protoc compiler still uses javax.annotation.Generated annotation, but since JDK9 the annotation has been moved to package javax.annotation.processing.Generated

@baev baev added the type:new feature Change that add something new for end users label Oct 27, 2021
description = "Allure gRPC Integration"

val agent: Configuration by configurations.creating

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please configure attributes: canbeconsumed=false, canberesolved=true, +attributes (runtime elements)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe provide a separate pull request with that change? We have it configured in such way in every module

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tasks.test {
useJUnitPlatform()
doFirst {
jvmArgs("-javaagent:${agent.singleFile}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@baev
Copy link
Copy Markdown
Member

baev commented Oct 27, 2021

@dtuchs code style fails the build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:build type:new feature Change that add something new for end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants