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

convert module apache-dubbo-2.7 test case from groovy to java #12008

Merged
merged 28 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
060c9c4
convert module apache-dubbo-2.7 test case from groovy to java
shalk Aug 14, 2024
6085bcc
fix compile error
shalk Aug 14, 2024
855291b
fix ut
shalk Aug 14, 2024
ff776e0
fix ut class
shalk Aug 14, 2024
33790bb
fix ut fail
shalk Aug 15, 2024
051d877
fix some ut fail with dubbo 3.2.15
shalk Aug 15, 2024
f3c6b5c
fix more ut problem
shalk Aug 16, 2024
deef59c
add comments
shalk Aug 16, 2024
0a0c324
Update AbstractDubboTraceChainTest.java
shalk Aug 17, 2024
e2f880b
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
7bf8fe6
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
5c21117
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
1449213
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
7a4ffbd
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
bf2da2a
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
538ebf6
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
f9d90d3
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
99455e9
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
c4ccf1a
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
a15a868
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
b394429
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
7abd7b5
Update instrumentation/apache-dubbo-2.7/testing/src/main/java/io/open…
shalk Aug 19, 2024
a4ba31d
fix compile warn
shalk Aug 19, 2024
3d6fe13
use setUp/tearDown
shalk Aug 26, 2024
b6f5cfd
revert dubbo build.gradle.kts
shalk Aug 27, 2024
85878d7
refine ut suppresswarning and cleanup
shalk Sep 2, 2024
dba1658
fix SuppressWarnings
shalk Sep 3, 2024
f29c195
fix cleanup
shalk Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.apachedubbo.v2_7;

import io.opentelemetry.instrumentation.apachedubbo.v2_7.AbstractDubboTest;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import org.junit.jupiter.api.extension.RegisterExtension;

class DubboAgentTest extends AbstractDubboTest {

@RegisterExtension
static final InstrumentationExtension testing = AgentInstrumentationExtension.create();

@Override
protected InstrumentationExtension testing() {
return testing;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.apachedubbo.v2_7;

import io.opentelemetry.instrumentation.apachedubbo.v2_7.AbstractDubboTraceChainTest;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import org.junit.jupiter.api.extension.RegisterExtension;

class DubboAgentTraceChainTest extends AbstractDubboTraceChainTest {

@RegisterExtension
static final InstrumentationExtension testing = AgentInstrumentationExtension.create();

@Override
protected InstrumentationExtension testing() {
return testing;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ enum DubboHeadersGetter implements TextMapGetter<DubboRequest> {
INSTANCE;

@Override
@SuppressWarnings("deprecation") // deprecation for dubbo 3.2.15
public Iterable<String> keys(DubboRequest request) {
return request.invocation().getAttachments().keySet();
}

@Override
@SuppressWarnings("deprecation") // deprecation for dubbo 3.2.15
public String get(DubboRequest request, String key) {
return request.invocation().getAttachment(key);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ final class TracingFilter implements Filter {
}

@Override
@SuppressWarnings("deprecation") // deprecation for RpcContext.getContext()
public Result invoke(Invoker<?> invoker, Invocation invocation) {
if (!(invocation instanceof RpcInvocation)) {
return invoker.invoke(invocation);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.instrumentation.apachedubbo.v2_7;

import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension;
import org.junit.jupiter.api.extension.RegisterExtension;

class DubboTest extends AbstractDubboTest {

@RegisterExtension
static final InstrumentationExtension testing = LibraryInstrumentationExtension.create();

@Override
protected InstrumentationExtension testing() {
return testing;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.instrumentation.apachedubbo.v2_7;

import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension;
import org.junit.jupiter.api.extension.RegisterExtension;

class DubboTraceChainTest extends AbstractDubboTraceChainTest {

@RegisterExtension
static final InstrumentationExtension testing = LibraryInstrumentationExtension.create();

@Override
protected InstrumentationExtension testing() {
return testing;
}
}

This file was deleted.

Loading
Loading