Support JDK 11 compiling and upgrade dependencies (#5579)
* Upgrade dependencies and make the JDK11 compiling passed. * Update license and fix license check file. * Add CI for JDK11 compiling. * Update doc.
This commit is contained in:
parent
5c1714329e
commit
103cf00672
|
|
@ -48,6 +48,19 @@ jobs:
|
|||
- name: 'Check Dependencies Licenses'
|
||||
run: tools/dependencies/check-LICENSE.sh
|
||||
|
||||
CI-on-JDK11:
|
||||
runs-on: ubuntu-18.04
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: 'Install & Test'
|
||||
run: ./mvnw --batch-mode -P"agent,backend,ui,dist" clean verify install
|
||||
|
||||
CI-on-Windows:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 90
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@
|
|||
<artifactId>apm-application-toolkit</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>apm-toolkit-log4j-1.x</module>
|
||||
<module>apm-toolkit-log4j-2.x</module>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,5 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@
|
|||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>${netty-tcnative-boringssl-static.version}</version>
|
||||
</dependency>
|
||||
<dependency> <!-- necessary for Java 9+ -->
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>annotations-api</artifactId>
|
||||
<version>${org.apache.tomcat.annotations-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<guava.version>20.0</guava.version>
|
||||
<bytebuddy.version>1.10.14</bytebuddy.version>
|
||||
<wiremock.version>2.6.0</wiremock.version>
|
||||
<netty-tcnative-boringssl-static.version>2.0.7.Final</netty-tcnative-boringssl-static.version>
|
||||
<os-maven-plugin.version>1.4.1.Final</os-maven-plugin.version>
|
||||
|
|
@ -68,6 +67,11 @@
|
|||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${bytebuddy.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>${gson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ public class WriterFactoryTest {
|
|||
assertTrue(AgentPackagePath.isPathFound());
|
||||
|
||||
IWriter logWriter = WriterFactory.getLogWriter();
|
||||
PowerMockito.verifyStatic();
|
||||
assertTrue(logWriter instanceof SystemOutWriter);
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +64,6 @@ public class WriterFactoryTest {
|
|||
assertTrue(AgentPackagePath.isPathFound());
|
||||
|
||||
IWriter logWriter = WriterFactory.getLogWriter();
|
||||
PowerMockito.verifyStatic();
|
||||
assertTrue(logWriter instanceof FileWriter);
|
||||
}
|
||||
}
|
||||
|
|
@ -28,11 +28,11 @@ import org.junit.AfterClass;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class CounterTest {
|
||||
@Rule
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
package org.apache.skywalking.apm.agent.core.meter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.apache.skywalking.apm.agent.core.test.tools.AgentServiceRule;
|
||||
import org.apache.skywalking.apm.network.language.agent.v3.Label;
|
||||
|
|
@ -28,11 +31,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class GaugeTest {
|
||||
@Rule
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
package org.apache.skywalking.apm.agent.core.meter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.apache.skywalking.apm.agent.core.test.tools.AgentServiceRule;
|
||||
import org.apache.skywalking.apm.network.language.agent.v3.Label;
|
||||
|
|
@ -28,11 +31,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class HistogramTest {
|
||||
@Rule
|
||||
|
|
@ -66,7 +65,11 @@ public class HistogramTest {
|
|||
final List<Label> labels = Arrays.asList(Label.newBuilder().setName("k1").setValue("v1").build());
|
||||
|
||||
// Check histogram message
|
||||
final Histogram histogram = MeterFactory.histogram("test").steps(Arrays.asList(2d, 5d)).minValue(1d).tag("k1", "v1").build();
|
||||
final Histogram histogram = MeterFactory.histogram("test")
|
||||
.steps(Arrays.asList(2d, 5d))
|
||||
.minValue(1d)
|
||||
.tag("k1", "v1")
|
||||
.build();
|
||||
histogram.addValue(1);
|
||||
histogram.addValue(3);
|
||||
histogram.addValue(3);
|
||||
|
|
|
|||
|
|
@ -18,14 +18,13 @@
|
|||
|
||||
package org.apache.skywalking.apm.agent.core.meter;
|
||||
|
||||
import org.apache.skywalking.apm.network.language.agent.v3.Label;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.apache.skywalking.apm.network.language.agent.v3.Label;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class MeterIdTest {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@
|
|||
<name>armeria-0.85.x-plugin</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>SkyWalking Agent Plugin for Armeria 0.85.0 ~ 0.98.0</description>
|
||||
<properties>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -325,10 +325,10 @@ public class SWCallableStatementTest extends AbstractStatementTest {
|
|||
verify(mysqlCallableStatement).setBlob(anyInt(), any(InputStream.class), anyLong());
|
||||
verify(mysqlCallableStatement).setClob(anyInt(), any(Clob.class));
|
||||
verify(mysqlCallableStatement).setClob(anyInt(), any(Reader.class));
|
||||
verify(mysqlCallableStatement).setClob(anyInt(), any(Reader.class), anyInt());
|
||||
verify(mysqlCallableStatement).setClob(anyInt(), any(Reader.class), anyLong());
|
||||
verify(mysqlCallableStatement).setNString(anyInt(), anyString());
|
||||
verify(mysqlCallableStatement).setNCharacterStream(anyInt(), any(Reader.class));
|
||||
verify(mysqlCallableStatement).setNCharacterStream(anyInt(), any(Reader.class), anyInt());
|
||||
verify(mysqlCallableStatement).setNCharacterStream(anyInt(), any(Reader.class), anyLong());
|
||||
verify(mysqlCallableStatement).setNClob(27, nClob);
|
||||
verify(mysqlCallableStatement).setNClob(28, reader, 1);
|
||||
verify(mysqlCallableStatement).setObject(anyInt(), Matchers.anyObject());
|
||||
|
|
@ -377,10 +377,10 @@ public class SWCallableStatementTest extends AbstractStatementTest {
|
|||
verify(mysqlCallableStatement).setBlob(anyString(), any(InputStream.class), anyLong());
|
||||
verify(mysqlCallableStatement).setClob(anyString(), any(Clob.class));
|
||||
verify(mysqlCallableStatement).setClob(anyString(), any(Reader.class));
|
||||
verify(mysqlCallableStatement).setClob(anyString(), any(Reader.class), anyInt());
|
||||
verify(mysqlCallableStatement).setClob(anyString(), any(Reader.class), anyLong());
|
||||
verify(mysqlCallableStatement).setNString(anyString(), anyString());
|
||||
verify(mysqlCallableStatement).setNCharacterStream(anyString(), any(Reader.class));
|
||||
verify(mysqlCallableStatement).setNCharacterStream(anyString(), any(Reader.class), anyInt());
|
||||
verify(mysqlCallableStatement).setNCharacterStream(anyString(), any(Reader.class), anyLong());
|
||||
verify(mysqlCallableStatement).setNClob(27, nClob);
|
||||
verify(mysqlCallableStatement).setNClob(28, reader, 1);
|
||||
verify(mysqlCallableStatement).setObject(anyString(), Matchers.anyObject());
|
||||
|
|
|
|||
|
|
@ -206,10 +206,10 @@ public class SwPreparedStatementTest extends AbstractStatementTest {
|
|||
verify(mysqlPreparedStatement).setBlob(anyInt(), any(InputStream.class), anyLong());
|
||||
verify(mysqlPreparedStatement).setClob(anyInt(), any(Clob.class));
|
||||
verify(mysqlPreparedStatement).setClob(anyInt(), any(Reader.class));
|
||||
verify(mysqlPreparedStatement).setClob(anyInt(), any(Reader.class), anyInt());
|
||||
verify(mysqlPreparedStatement).setClob(anyInt(), any(Reader.class), anyLong());
|
||||
verify(mysqlPreparedStatement).setNString(anyInt(), anyString());
|
||||
verify(mysqlPreparedStatement).setNCharacterStream(anyInt(), any(Reader.class));
|
||||
verify(mysqlPreparedStatement).setNCharacterStream(anyInt(), any(Reader.class), anyInt());
|
||||
verify(mysqlPreparedStatement).setNCharacterStream(anyInt(), any(Reader.class), anyLong());
|
||||
verify(mysqlPreparedStatement).setNClob(27, nClob);
|
||||
verify(mysqlPreparedStatement).setNClob(28, reader, 1);
|
||||
verify(mysqlPreparedStatement).setObject(anyInt(), Matchers.anyObject());
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
<lettuce-core.version>5.1.3.RELEASE</lettuce-core.version>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -127,6 +127,12 @@
|
|||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${bytebuddy.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>apm-util</artifactId>
|
||||
|
|
|
|||
|
|
@ -41,6 +41,5 @@
|
|||
<version>${redisson.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -30,7 +30,6 @@ import org.junit.Before;
|
|||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.modules.junit4.PowerMockRunnerDelegate;
|
||||
import org.redisson.config.Config;
|
||||
|
|
@ -45,9 +44,7 @@ public class RedisConnectionMethodInterceptorTest {
|
|||
@Rule
|
||||
public AgentServiceRule serviceRule = new AgentServiceRule();
|
||||
|
||||
@Mock
|
||||
private MockInstance mockRedisClientInstance;
|
||||
@Mock
|
||||
private MockInstance mockRedisConnectionInstance;
|
||||
|
||||
private RedisConnectionMethodInterceptor interceptor;
|
||||
|
|
@ -67,8 +64,8 @@ public class RedisConnectionMethodInterceptorTest {
|
|||
}
|
||||
|
||||
@SuppressWarnings({
|
||||
"rawtypes",
|
||||
"unchecked"
|
||||
"rawtypes",
|
||||
"unchecked"
|
||||
})
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
|
@ -80,8 +77,9 @@ public class RedisConnectionMethodInterceptorTest {
|
|||
|
||||
@Test
|
||||
public void testIntercept() throws Throwable {
|
||||
interceptor.onConstruct(mockRedisConnectionInstance, new Object[]{mockRedisClientInstance});
|
||||
MatcherAssert.assertThat((String) mockRedisConnectionInstance.getSkyWalkingDynamicField(), Is.is("127.0.0.1:6379;127.0.0.1:6378;"));
|
||||
interceptor.onConstruct(mockRedisConnectionInstance, new Object[] {mockRedisClientInstance});
|
||||
MatcherAssert.assertThat(
|
||||
(String) mockRedisConnectionInstance.getSkyWalkingDynamicField(), Is.is("127.0.0.1:6379;127.0.0.1:6378;"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class TransportClientHandlerInterceptorTest {
|
|||
nextInterceptor = new TransportClientHandlerInterceptor();
|
||||
PowerMockito.mock(Invocation.class);
|
||||
when(operationMeta.getSchemaMeta()).thenReturn(schemaMeta);
|
||||
when(endpoint.getAddress()).thenReturn("0.0.0.0:7777");
|
||||
when(endpoint.toString()).thenReturn("/bmi");
|
||||
when(invocation.getEndpoint()).thenReturn(endpoint);
|
||||
when(invocation.getMicroserviceQualifiedName()).thenReturn("consumerTest");
|
||||
when(operationMeta.getOperationPath()).thenReturn("/bmi");
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class TransportClientHandlerInterceptorTest {
|
|||
nextInterceptor = new TransportClientHandlerInterceptor();
|
||||
PowerMockito.mock(Invocation.class);
|
||||
when(operationMeta.getSchemaMeta()).thenReturn(schemaMeta);
|
||||
when(endpoint.getAddress()).thenReturn("0.0.0.0:7777");
|
||||
when(endpoint.toString()).thenReturn("/bmi");
|
||||
when(invocation.getEndpoint()).thenReturn(endpoint);
|
||||
when(invocation.getMicroserviceQualifiedName()).thenReturn("consumerTest");
|
||||
when(operationMeta.getOperationPath()).thenReturn("/bmi");
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.plugin.spring.mvc.v3;
|
||||
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.plugin.spring.mvc.commons.EnhanceRequireObjectCache;
|
||||
import org.apache.skywalking.apm.plugin.spring.mvc.commons.interceptor.GetBeanInterceptor;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Matchers;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class GetBeanInterceptorTest {
|
||||
|
||||
@Mock
|
||||
private EnhancedInstance enhancedInstance;
|
||||
|
||||
@Mock
|
||||
private NativeWebRequest request;
|
||||
|
||||
@Mock
|
||||
private EnhancedInstance enhanceRet;
|
||||
|
||||
private GetBeanInterceptor interceptor;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
interceptor = new GetBeanInterceptor();
|
||||
|
||||
when(enhanceRet.getSkyWalkingDynamicField()).thenReturn(new EnhanceRequireObjectCache());
|
||||
when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn(request);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testResultIsNotEnhanceInstance() throws Throwable {
|
||||
interceptor.afterMethod(enhancedInstance, null, null, null, new Object());
|
||||
|
||||
verify(enhanceRet, times(0)).setSkyWalkingDynamicField(Matchers.any());
|
||||
}
|
||||
}
|
||||
|
|
@ -37,8 +37,4 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
@ -43,6 +43,14 @@
|
|||
<artifactId>struts2-core</artifactId>
|
||||
<version>${struts2-core.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<!-- The default javassist is not compatible with 3.x power mock. -->
|
||||
<!-- Manually add the dependency back for test below. -->
|
||||
<exclusion>
|
||||
<groupId>javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
|
@ -56,5 +64,11 @@
|
|||
<version>${jsp-api.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>3.24.0-GA</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
package org.apache.skywalking.apm.toolkit.activation.meter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.apache.skywalking.apm.agent.core.meter.BaseMeter;
|
||||
import org.apache.skywalking.apm.agent.core.meter.MeterService;
|
||||
|
|
@ -30,10 +32,7 @@ import org.apache.skywalking.apm.toolkit.meter.MeterId;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class CounterConstructInterceptorTest {
|
||||
|
||||
|
|
@ -47,10 +46,12 @@ public class CounterConstructInterceptorTest {
|
|||
public void testConstruct() {
|
||||
counterConstructInterceptor.onConstruct(enhancedInstance, new Object[] {
|
||||
new MeterId("test", MeterId.MeterType.COUNTER, Arrays.asList(new MeterId.Tag("k1", "v1"))),
|
||||
Counter.Mode.RATE});
|
||||
Counter.Mode.RATE
|
||||
});
|
||||
|
||||
final MeterService service = ServiceManager.INSTANCE.findService(MeterService.class);
|
||||
final Map<MeterId, BaseMeter> meterMap = (Map<MeterId, BaseMeter>) Whitebox.getInternalState(service, "meterMap");
|
||||
final Map<MeterId, BaseMeter> meterMap = (Map<MeterId, BaseMeter>) Whitebox.getInternalState(
|
||||
service, "meterMap");
|
||||
Assert.assertEquals(1, meterMap.size());
|
||||
|
||||
final BaseMeter meterData = meterMap.values().iterator().next();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
package org.apache.skywalking.apm.toolkit.activation.meter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.apache.skywalking.apm.agent.core.meter.BaseMeter;
|
||||
import org.apache.skywalking.apm.agent.core.meter.Gauge;
|
||||
|
|
@ -30,11 +33,7 @@ import org.apache.skywalking.apm.toolkit.meter.MeterId;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class GaugeConstructInterceptorTest {
|
||||
|
||||
|
|
@ -52,7 +51,8 @@ public class GaugeConstructInterceptorTest {
|
|||
});
|
||||
|
||||
final MeterService service = ServiceManager.INSTANCE.findService(MeterService.class);
|
||||
final Map<MeterId, BaseMeter> meterMap = (Map<MeterId, BaseMeter>) Whitebox.getInternalState(service, "meterMap");
|
||||
final Map<MeterId, BaseMeter> meterMap = (Map<MeterId, BaseMeter>) Whitebox.getInternalState(
|
||||
service, "meterMap");
|
||||
Assert.assertEquals(1, meterMap.size());
|
||||
|
||||
final Object field = meterMap.values().iterator().next();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
package org.apache.skywalking.apm.toolkit.activation.meter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.apache.skywalking.apm.agent.core.meter.BaseMeter;
|
||||
import org.apache.skywalking.apm.agent.core.meter.Histogram;
|
||||
|
|
@ -30,10 +32,7 @@ import org.apache.skywalking.apm.toolkit.meter.MeterId;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
public class HistogramConstructInterceptorTest {
|
||||
|
||||
|
|
@ -47,10 +46,12 @@ public class HistogramConstructInterceptorTest {
|
|||
public void testConstruct() {
|
||||
histogramConstructInterceptor.onConstruct(enhancedInstance, new Object[] {
|
||||
new MeterId("test", MeterId.MeterType.HISTOGRAM, Arrays.asList(new MeterId.Tag("k1", "v1"))),
|
||||
Arrays.asList(1d, 5d, 10d)});
|
||||
Arrays.asList(1d, 5d, 10d)
|
||||
});
|
||||
|
||||
final MeterService service = ServiceManager.INSTANCE.findService(MeterService.class);
|
||||
final Map<MeterId, BaseMeter> meterMap = (Map<MeterId, BaseMeter>) Whitebox.getInternalState(service, "meterMap");
|
||||
final Map<MeterId, BaseMeter> meterMap = (Map<MeterId, BaseMeter>) Whitebox.getInternalState(
|
||||
service, "meterMap");
|
||||
Assert.assertEquals(1, meterMap.size());
|
||||
|
||||
final Object field = meterMap.values().iterator().next();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
<properties>
|
||||
<spring-cloud-starter-gateway.version>2.1.1.RELEASE</spring-cloud-starter-gateway.version>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
<properties>
|
||||
<spring-cloud-starter-gateway.version>2.1.1.RELEASE</spring-cloud-starter-gateway.version>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -37,8 +37,4 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.boot.version>1.5.11.RELEASE</spring.boot.version>
|
||||
<log4j.version>2.6.2</log4j.version>
|
||||
|
|
@ -97,17 +96,23 @@
|
|||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback-classic.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Add for JDK9+ -->
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback-classic.version}</version>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -226,12 +226,11 @@ The following components are provided under the Apache License. See project link
|
|||
The text of each license is the standard Apache 2.0 license.
|
||||
|
||||
raphw (byte-buddy) 1.10.14: http://bytebuddy.net/ , Apache 2.0
|
||||
Google: gprc-java 1.26.0: https://github.com/grpc/grpc-java, Apache 2.0
|
||||
Google: gprc-java 1.32.1: https://github.com/grpc/grpc-java, Apache 2.0
|
||||
Google: guava 28.1: https://github.com/google/guava , Apache 2.0
|
||||
Google: guice 4.1.0: https://github.com/google/guice , Apache 2.0
|
||||
Google: gson 2.8.6: https://github.com/google/gson , Apache 2.0
|
||||
Google: opencensus-java 0.24.0: https://github.com/census-instrumentation/opencensus-java , Apache 2.0
|
||||
Google: proto-google-common-protos 1.12.0: https://github.com/googleapis/googleapis , Apache 2.0
|
||||
Google: proto-google-common-protos 1.17.0: https://github.com/googleapis/googleapis , Apache 2.0
|
||||
Google: jsr305 3.0.2: http://central.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.pom , Apache 2.0
|
||||
Elasticsearch BV (Elasticsearch) 6.3.2: https://www.elastic.co/products/elasticsearch , Apache 2.0
|
||||
Elasticsearch BV (Elasticsearch) 7.0.0: https://www.elastic.co/products/elasticsearch , Apache 2.0
|
||||
|
|
@ -241,8 +240,6 @@ The text of each license is the standard Apache 2.0 license.
|
|||
percolator-client 5.5.0: https://github.com/elastic/elasticsearch/tree/master/modules/percolator , Apache 2.0
|
||||
rest 5.5.0: https://github.com/elastic/elasticsearch/tree/master/client/rest , Apache 2.0
|
||||
transport 5.5.0: https://github.com/elastic/elasticsearch/tree/master/client/transport , Apache 2.0
|
||||
transport-netty3-client 5.5.0: http://central.maven.org/maven2/org/elasticsearch/plugin/transport-netty3-client/5.5.0/transport-netty3-client-5.5.0.pom , Apache 2.0
|
||||
transport-netty4-client 5.5.0: http://central.maven.org/maven2/org/elasticsearch/plugin/transport-netty4-client/5.5.0/transport-netty4-client-5.5.0.pom , Apache 2.0
|
||||
securesm 1.1: https://github.com/elastic/securesm/blob/master/pom.xml , Apache 2.0
|
||||
LMAX Ltd.(disruptor) 3.3.6: https://github.com/LMAX-Exchange/disruptor , Apache 2.0
|
||||
Eclipse (Jetty) 9.4.28.v20200408: https://www.eclipse.org/jetty/ , Apache 2.0 and Eclipse Public License 1.0
|
||||
|
|
@ -271,7 +268,7 @@ The text of each license is the standard Apache 2.0 license.
|
|||
Apache: commons-collections4 4.1: https://mvnrepository.com/artifact/org.apache.commons/commons-collections4, Apache 2.0
|
||||
Apache: tomcat 8.5.27: https://github.com/apache/tomcat/tree/trunk, Apache 2.0
|
||||
Apache: freemarker 2.3.28: https://github.com/apache/freemarker, Apache 2.0
|
||||
netty 5.5.0: https://github.com/netty/netty/blob/4.1/LICENSE.txt, Apache 2.0
|
||||
netty 4.1.12: https://github.com/netty/netty/blob/4.1/LICENSE.txt, Apache 2.0
|
||||
annotations 13.0: http://www.jetbrains.org, Apache 2.0
|
||||
compiler 0.9.3: https://github.com/spullara/mustache.java, Apache 2.0
|
||||
error_prone_annotations 2.3.2: https://github.com/google/error-prone, Apache 2.0
|
||||
|
|
@ -378,8 +375,8 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
|
|||
asm 8.0.1:https://gitlab.ow2.org , BSD-3-Clause
|
||||
antlr4-runtime 4.5.1: http://www.antlr.org/license.html, BSD-3-Clause
|
||||
jline 0.9.94: http://mvnrepository.com/artifact/jline/jline/0.9.94, BSD
|
||||
Google: protobuf-java 3.4.0: https://github.com/google/protobuf/blob/master/java/pom.xml , BSD-3-Clause
|
||||
Google: protobuf-java-util 3.4.0: https://github.com/google/protobuf/blob/master/java/pom.xml , BSD-3-Clause
|
||||
Google: protobuf-java 3.13.0: https://github.com/google/protobuf/blob/master/java/pom.xml , BSD-3-Clause
|
||||
Google: protobuf-java-util 3.12.4: https://github.com/google/protobuf/blob/master/java/pom.xml , BSD-3-Clause
|
||||
reflectasm 1.11.3: https://github.com/EsotericSoftware/reflectasm , BSD-3-Clause
|
||||
|
||||
proto files from gogo: https://github.com/gogo/protobuf BSD-2
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and pu
|
|||
```
|
||||
|
||||
### Build from GitHub
|
||||
1. Prepare git, JDK8 and Maven 3.6+
|
||||
1. Prepare git, JDK8+ and Maven 3.6+
|
||||
1. Clone project
|
||||
|
||||
If you want to build a release from source codes, provide a `tag name` by using `git clone -b [tag_name] ...` while cloning.
|
||||
|
|
@ -41,7 +41,7 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and pu
|
|||
|
||||
For each official Apache release, there is a complete and independent source code tar, which is including all source codes. You could download it from [SkyWalking Apache download page](http://skywalking.apache.org/downloads/). No git related stuff required when compiling this. Just follow these steps.
|
||||
|
||||
1. Prepare JDK8 and Maven 3.6+
|
||||
1. Prepare JDK8+ and Maven 3.6+
|
||||
1. Run `./mvnw clean package -DskipTests`
|
||||
1. All packages are in `/dist`.(.tar.gz for Linux and .zip for Windows).
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import org.apache.skywalking.oap.server.library.module.ModuleManager;
|
|||
import org.junit.Before;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
|
@ -90,19 +90,32 @@ public abstract class MeterBaseTest {
|
|||
timestamp = System.currentTimeMillis();
|
||||
// single value
|
||||
processor.read(MeterData.newBuilder()
|
||||
.setService("service").setServiceInstance("instance").setTimestamp(timestamp)
|
||||
.setSingleValue(MeterSingleValue.newBuilder().setName("test_count1")
|
||||
.addLabels(Label.newBuilder().setName("k1").setValue("v1").build()).setValue(1).build())
|
||||
.build());
|
||||
.setService("service").setServiceInstance("instance").setTimestamp(timestamp)
|
||||
.setSingleValue(MeterSingleValue.newBuilder().setName("test_count1")
|
||||
.addLabels(Label.newBuilder()
|
||||
.setName("k1")
|
||||
.setValue("v1")
|
||||
.build()).setValue(1).build())
|
||||
.build());
|
||||
|
||||
// histogram
|
||||
processor.read(MeterData.newBuilder()
|
||||
.setHistogram(MeterHistogram.newBuilder().setName("test_histogram")
|
||||
.addLabels(Label.newBuilder().setName("k2").setValue("v2").build())
|
||||
.addValues(MeterBucketValue.newBuilder().setBucket(1).setCount(10).build())
|
||||
.addValues(MeterBucketValue.newBuilder().setBucket(5).setCount(15).build())
|
||||
.addValues(MeterBucketValue.newBuilder().setBucket(10).setCount(3).build())
|
||||
.build())
|
||||
.build());
|
||||
.setHistogram(MeterHistogram.newBuilder().setName("test_histogram")
|
||||
.addLabels(
|
||||
Label.newBuilder().setName("k2").setValue("v2").build())
|
||||
.addValues(MeterBucketValue.newBuilder()
|
||||
.setBucket(1)
|
||||
.setCount(10)
|
||||
.build())
|
||||
.addValues(MeterBucketValue.newBuilder()
|
||||
.setBucket(5)
|
||||
.setCount(15)
|
||||
.build())
|
||||
.addValues(MeterBucketValue.newBuilder()
|
||||
.setBucket(10)
|
||||
.setCount(3)
|
||||
.build())
|
||||
.build())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,27 +31,28 @@ import org.apache.skywalking.oap.server.library.module.ModuleStartException;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.doCallRealMethod;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class MeterBuilderTest extends MeterBaseTest {
|
||||
|
||||
@Test
|
||||
public void testBuildAndSend() throws ModuleStartException {
|
||||
List<AcceptableValue> values = new ArrayList<>();
|
||||
doAnswer(invocationOnMock -> {
|
||||
values.add(invocationOnMock.getArgumentAt(0, AcceptableValue.class));
|
||||
values.add(invocationOnMock.getArgument(0, AcceptableValue.class));
|
||||
return null;
|
||||
}).when(meterSystem).doStreamingCalculation(any());
|
||||
|
||||
final MeterProcessService context = (MeterProcessService) Whitebox.getInternalState(processor, "processService");
|
||||
final MeterProcessService context = (MeterProcessService) Whitebox.getInternalState(
|
||||
processor, "processService");
|
||||
context.enabledBuilders().stream().peek(b -> doCallRealMethod().when(b).buildAndSend(any(), any()));
|
||||
context.initMeters();
|
||||
|
||||
|
|
@ -91,7 +92,8 @@ public class MeterBuilderTest extends MeterBaseTest {
|
|||
private void verifyDataTable(DataTable table, Object... data) {
|
||||
Assert.assertEquals(data.length / 2, table.size());
|
||||
for (int i = 0; i < data.length; i += 2) {
|
||||
Assert.assertEquals(Long.parseLong(String.valueOf(data[i + 1])), table.get(String.valueOf(data[i])).longValue());
|
||||
Assert.assertEquals(
|
||||
Long.parseLong(String.valueOf(data[i + 1])), table.get(String.valueOf(data[i])).longValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,16 +25,16 @@ import org.apache.skywalking.oap.server.library.module.ModuleStartException;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class MeterProcessContextTest extends MeterBaseTest {
|
||||
private static final String CONFIG_PATH = "meter-receive-config";
|
||||
|
||||
|
|
|
|||
|
|
@ -18,18 +18,17 @@
|
|||
|
||||
package org.apache.skywalking.oap.server.analyzer.provider.meter.process;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.doNothing;
|
||||
|
|
@ -38,7 +37,7 @@ import static org.mockito.Mockito.verify;
|
|||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class MeterProcessorTest extends MeterBaseTest {
|
||||
|
||||
@Test
|
||||
|
|
@ -49,15 +48,18 @@ public class MeterProcessorTest extends MeterBaseTest {
|
|||
Assert.assertEquals(timestamp, processor.timestamp().longValue());
|
||||
|
||||
// meters check
|
||||
final Map<String, EvalMultipleData> meters = (Map<String, EvalMultipleData>) Whitebox.getInternalState(processor, "meters");
|
||||
final Map<String, EvalMultipleData> meters = (Map<String, EvalMultipleData>) Whitebox.getInternalState(
|
||||
processor, "meters");
|
||||
Assert.assertEquals(2, meters.size());
|
||||
|
||||
// single value
|
||||
EvalSingleData singleData = verifyBaseData(meters.get("test_count1"), "test_count1", Collections.singletonMap("k1", "v1"));
|
||||
EvalSingleData singleData = verifyBaseData(
|
||||
meters.get("test_count1"), "test_count1", Collections.singletonMap("k1", "v1"));
|
||||
Assert.assertEquals(1, singleData.getValue(), 0.0);
|
||||
|
||||
// histogram
|
||||
EvalHistogramData histogramData = verifyBaseData(meters.get("test_histogram"), "test_histogram", Collections.singletonMap("k2", "v2"));
|
||||
EvalHistogramData histogramData = verifyBaseData(
|
||||
meters.get("test_histogram"), "test_histogram", Collections.singletonMap("k2", "v2"));
|
||||
Assert.assertEquals(3, histogramData.getBuckets().size());
|
||||
Assert.assertEquals(10, histogramData.getBuckets().get(1d).longValue());
|
||||
Assert.assertEquals(15, histogramData.getBuckets().get(5d).longValue());
|
||||
|
|
@ -68,8 +70,11 @@ public class MeterProcessorTest extends MeterBaseTest {
|
|||
public void testProcess() {
|
||||
// each builder has build and send
|
||||
MeterProcessService context = (MeterProcessService) Whitebox.getInternalState(processor, "processService");
|
||||
List<MeterBuilder> builders = context.enabledBuilders().stream().map(Mockito::spy)
|
||||
.peek(builder -> doNothing().when(builder).buildAndSend(any(), any())).collect(Collectors.toList());
|
||||
List<MeterBuilder> builders = context.enabledBuilders()
|
||||
.stream()
|
||||
.map(Mockito::spy)
|
||||
.peek(builder -> doNothing().when(builder).buildAndSend(any(), any()))
|
||||
.collect(Collectors.toList());
|
||||
Whitebox.setInternalState(context, "meterBuilders", builders);
|
||||
processor.process();
|
||||
builders.stream().forEach(b -> verify(b, times(1)).buildAndSend(any(), any()));
|
||||
|
|
|
|||
|
|
@ -52,11 +52,12 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<protobuf-java.version>3.13.0</protobuf-java.version>
|
||||
<protobuf-java-util.version>3.12.4</protobuf-java-util.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<log4j.version>2.9.0</log4j.version>
|
||||
<guava.version>28.1-jre</guava.version>
|
||||
<snakeyaml.version>1.18</snakeyaml.version>
|
||||
<gson.version>2.8.6</gson.version>
|
||||
<graphql-java-tools.version>5.2.3</graphql-java-tools.version>
|
||||
<graphql-java.version>8.0</graphql-java.version>
|
||||
<zookeeper.version>3.4.10</zookeeper.version>
|
||||
|
|
@ -95,7 +96,6 @@
|
|||
<groovy.version>3.0.3</groovy.version>
|
||||
|
||||
<zookeeper.image.version>3.5</zookeeper.image.version>
|
||||
<protobuf-java-util.version>3.11.4</protobuf-java-util.version>
|
||||
<kafka-clients.version>2.4.1</kafka-clients.version>
|
||||
<spring-kafka-test.version>2.4.6.RELEASE</spring-kafka-test.version>
|
||||
</properties>
|
||||
|
|
@ -127,6 +127,13 @@
|
|||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${bytebuddy.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
@ -271,6 +278,11 @@
|
|||
<version>${grpc.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>${protobuf-java.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ import static org.mockito.Mockito.verify;
|
|||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
@PrepareForTest(DefaultScopeDefine.class)
|
||||
public class NotifyHandlerTest {
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ import static org.mockito.Mockito.when;
|
|||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(Consul.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class ClusterModuleConsulProviderTest {
|
||||
|
||||
private ClusterModuleConsulProvider provider = new ClusterModuleConsulProvider();
|
||||
|
|
|
|||
|
|
@ -1,119 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.oap.server.cluster.plugin.etcd;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import org.apache.skywalking.oap.server.core.CoreModule;
|
||||
import org.apache.skywalking.oap.server.core.cluster.ClusterModule;
|
||||
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
|
||||
import org.apache.skywalking.oap.server.library.module.ModuleStartException;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(EtcdUtils.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
public class ClusterModuleEtcdProviderTest {
|
||||
|
||||
private ClusterModuleEtcdProvider provider = new ClusterModuleEtcdProvider();
|
||||
|
||||
@Test
|
||||
public void name() {
|
||||
assertEquals("etcd", provider.name());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void module() {
|
||||
assertEquals(ClusterModule.class, provider.module());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createConfigBeanIfAbsent() {
|
||||
ModuleConfig moduleConfig = provider.createConfigBeanIfAbsent();
|
||||
assertTrue(moduleConfig instanceof ClusterModuleEtcdConfig);
|
||||
}
|
||||
|
||||
@Test(expected = ModuleStartException.class)
|
||||
public void prepareWithNonHost() throws Exception {
|
||||
provider.prepare();
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void prepare() throws Exception {
|
||||
PowerMockito.mockStatic(EtcdUtils.class);
|
||||
ClusterModuleEtcdConfig etcdConfig = new ClusterModuleEtcdConfig();
|
||||
etcdConfig.setHostPort("10.0.0.1:1000,10.0.0.2:1001");
|
||||
Whitebox.setInternalState(provider, "config", etcdConfig);
|
||||
provider.prepare();
|
||||
|
||||
List<URI> uris = mock(List.class);
|
||||
PowerMockito.when(EtcdUtils.parse(etcdConfig)).thenReturn(uris);
|
||||
ArgumentCaptor<ClusterModuleEtcdConfig> addressCaptor = ArgumentCaptor.forClass(ClusterModuleEtcdConfig.class);
|
||||
PowerMockito.verifyStatic();
|
||||
EtcdUtils.parse(addressCaptor.capture());
|
||||
ClusterModuleEtcdConfig cfg = addressCaptor.getValue();
|
||||
assertEquals(etcdConfig.getHostPort(), cfg.getHostPort());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void prepareSingle() throws Exception {
|
||||
PowerMockito.mockStatic(EtcdUtils.class);
|
||||
ClusterModuleEtcdConfig etcdConfig = new ClusterModuleEtcdConfig();
|
||||
etcdConfig.setHostPort("10.0.0.1:1000");
|
||||
Whitebox.setInternalState(provider, "config", etcdConfig);
|
||||
provider.prepare();
|
||||
|
||||
List<URI> uris = mock(List.class);
|
||||
PowerMockito.when(EtcdUtils.parse(etcdConfig)).thenReturn(uris);
|
||||
ArgumentCaptor<ClusterModuleEtcdConfig> addressCaptor = ArgumentCaptor.forClass(ClusterModuleEtcdConfig.class);
|
||||
PowerMockito.verifyStatic();
|
||||
EtcdUtils.parse(addressCaptor.capture());
|
||||
ClusterModuleEtcdConfig cfg = addressCaptor.getValue();
|
||||
assertEquals(etcdConfig.getHostPort(), cfg.getHostPort());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void start() {
|
||||
provider.start();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void notifyAfterCompleted() {
|
||||
provider.notifyAfterCompleted();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requiredModules() {
|
||||
String[] modules = provider.requiredModules();
|
||||
assertArrayEquals(new String[] {CoreModule.NAME}, modules);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.oap.server.cluster.plugin.etcd;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import mousio.etcd4j.EtcdClient;
|
||||
import mousio.etcd4j.promises.EtcdResponsePromise;
|
||||
import mousio.etcd4j.requests.EtcdKeyGetRequest;
|
||||
import mousio.etcd4j.requests.EtcdKeyPutRequest;
|
||||
import mousio.etcd4j.responses.EtcdKeysResponse;
|
||||
import org.apache.skywalking.oap.server.core.cluster.RemoteInstance;
|
||||
import org.apache.skywalking.oap.server.core.remote.client.Address;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.mockito.Matchers.anyInt;
|
||||
import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(EtcdKeysResponse.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
public class EtcdCoordinatorTest {
|
||||
|
||||
private ClusterModuleEtcdConfig etcdConfig = new ClusterModuleEtcdConfig();
|
||||
|
||||
private EtcdClient client;
|
||||
|
||||
private EtcdCoordinator coordinator;
|
||||
|
||||
private Gson gson = new Gson();
|
||||
|
||||
private Address remoteAddress = new Address("10.0.0.1", 1000, false);
|
||||
private Address selfRemoteAddress = new Address("10.0.0.2", 1001, true);
|
||||
|
||||
private Address internalAddress = new Address("10.0.0.3", 1002, false);
|
||||
|
||||
private static final String SERVICE_NAME = "my-service";
|
||||
|
||||
private EtcdResponsePromise<EtcdKeysResponse> getPromise;
|
||||
private EtcdResponsePromise<EtcdKeysResponse> putPromise;
|
||||
|
||||
private EtcdKeysResponse response;
|
||||
|
||||
private EtcdKeyPutRequest putRequest = mock(EtcdKeyPutRequest.class);
|
||||
|
||||
private EtcdKeyGetRequest getRequest = mock(EtcdKeyGetRequest.class);
|
||||
|
||||
private EtcdKeyPutRequest putDirRequest = mock(EtcdKeyPutRequest.class);
|
||||
|
||||
private EtcdResponsePromise<EtcdKeysResponse> putDirPromise;
|
||||
|
||||
@Mock
|
||||
private List<EtcdKeysResponse.EtcdNode> list = mock(List.class);
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
etcdConfig.setServiceName(SERVICE_NAME);
|
||||
|
||||
client = mock(EtcdClient.class);
|
||||
PowerMockito.whenNew(EtcdClient.class).withAnyArguments().thenReturn(client);
|
||||
client = new EtcdClient("http://10.0.0.1:1000", "http://10.0.0.2:2000");
|
||||
coordinator = new EtcdCoordinator(etcdConfig, client);
|
||||
|
||||
putPromise = (EtcdResponsePromise<EtcdKeysResponse>) mock(EtcdResponsePromise.class);
|
||||
getPromise = (EtcdResponsePromise<EtcdKeysResponse>) mock(EtcdResponsePromise.class);
|
||||
putDirPromise = (EtcdResponsePromise<EtcdKeysResponse>) mock(EtcdResponsePromise.class);
|
||||
|
||||
PowerMockito.when(client.putDir(anyString())).thenReturn(putDirRequest);
|
||||
PowerMockito.when(putDirRequest.ttl(anyInt())).thenReturn(putDirRequest);
|
||||
PowerMockito.when(putDirRequest.send()).thenReturn(putDirPromise);
|
||||
PowerMockito.when(client.put(anyString(), anyString())).thenReturn(putRequest);
|
||||
PowerMockito.when(putRequest.ttl(anyInt())).thenReturn(putRequest);
|
||||
PowerMockito.when(putRequest.send()).thenReturn(putPromise);
|
||||
PowerMockito.when(client.get(anyString())).thenReturn(getRequest);
|
||||
PowerMockito.when(getRequest.send()).thenReturn(getPromise);
|
||||
|
||||
response = PowerMockito.mock(EtcdKeysResponse.class);
|
||||
|
||||
response = PowerMockito.mock(EtcdKeysResponse.class);
|
||||
when(putPromise.get()).thenReturn(response);
|
||||
when(getPromise.get()).thenReturn(response);
|
||||
when(putDirPromise.get()).thenReturn(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void queryRemoteNodesWithNonOrEmpty() {
|
||||
EtcdKeysResponse.EtcdNode node = PowerMockito.mock(EtcdKeysResponse.EtcdNode.class);
|
||||
when(response.getNode()).thenReturn(node);
|
||||
when(node.getValue()).thenReturn("{}");
|
||||
assertEquals(0, coordinator.queryRemoteNodes().size());
|
||||
assertEquals(0, coordinator.queryRemoteNodes().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryRemoteNodes() {
|
||||
registerSelfRemote();
|
||||
|
||||
EtcdKeysResponse.EtcdNode node = PowerMockito.mock(EtcdKeysResponse.EtcdNode.class);
|
||||
EtcdKeysResponse.EtcdNode node1 = PowerMockito.mock(EtcdKeysResponse.EtcdNode.class);
|
||||
|
||||
when(response.getNode()).thenReturn(node);
|
||||
list = new ArrayList<>();
|
||||
List list1 = Mockito.spy(list);
|
||||
list1.add(node1);
|
||||
when(node.getNodes()).thenReturn(list1);
|
||||
when(node1.getValue()).thenReturn("{\"serviceId\":\"my-service\",\"host\":\"10.0.0.2\",\"port\":1001}");
|
||||
List<RemoteInstance> remoteInstances = coordinator.queryRemoteNodes();
|
||||
assertEquals(1, remoteInstances.size());
|
||||
|
||||
RemoteInstance selfInstance = remoteInstances.get(0);
|
||||
velidate(selfRemoteAddress, selfInstance);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void registerRemote() {
|
||||
registerRemote(remoteAddress);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void registerSelfRemote() {
|
||||
registerRemote(selfRemoteAddress);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void registerRemoteUsingInternal() {
|
||||
etcdConfig.setInternalComHost(internalAddress.getHost());
|
||||
etcdConfig.setInternalComPort(internalAddress.getPort());
|
||||
registerRemote(internalAddress);
|
||||
}
|
||||
|
||||
private void velidate(Address originArress, RemoteInstance instance) {
|
||||
Address instanceAddress = instance.getAddress();
|
||||
assertEquals(originArress.getHost(), instanceAddress.getHost());
|
||||
assertEquals(originArress.getPort(), instanceAddress.getPort());
|
||||
}
|
||||
|
||||
private void registerRemote(Address address) {
|
||||
coordinator.registerRemote(new RemoteInstance(address));
|
||||
EtcdEndpoint endpoint = afterRegister().get(0);
|
||||
verifyRegistration(address, endpoint);
|
||||
}
|
||||
|
||||
private List<EtcdEndpoint> afterRegister() {
|
||||
ArgumentCaptor<String> argumentCaptor = ArgumentCaptor.forClass(String.class);
|
||||
ArgumentCaptor<String> nameCaptor = ArgumentCaptor.forClass(String.class);
|
||||
verify(client).put(nameCaptor.capture(), argumentCaptor.capture());
|
||||
EtcdEndpoint endpoint = gson.fromJson(argumentCaptor.getValue(), EtcdEndpoint.class);
|
||||
List<EtcdEndpoint> list = new ArrayList<>();
|
||||
list.add(endpoint);
|
||||
return list;
|
||||
}
|
||||
|
||||
private void verifyRegistration(Address remoteAddress, EtcdEndpoint endpoint) {
|
||||
assertNotNull(endpoint);
|
||||
assertEquals(SERVICE_NAME, endpoint.getServiceName());
|
||||
assertEquals(remoteAddress.getHost(), endpoint.getHost());
|
||||
assertEquals(remoteAddress.getPort(), endpoint.getPort());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ import static org.junit.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class ClusterModuleKubernetesProviderTest {
|
||||
|
||||
private ClusterModuleKubernetesProvider provider = new ClusterModuleKubernetesProvider();
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import org.powermock.reflect.Whitebox;
|
|||
import static org.powermock.api.mockito.PowerMockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
@PrepareForTest({NamespacedPodListInformer.class})
|
||||
public class KubernetesCoordinatorTest {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.oap.server.cluster.plugin.nacos;
|
||||
|
||||
import com.alibaba.nacos.api.PropertyKeyConst;
|
||||
import com.alibaba.nacos.api.naming.NamingFactory;
|
||||
import com.alibaba.nacos.api.naming.NamingService;
|
||||
import java.util.Properties;
|
||||
import org.apache.skywalking.oap.server.core.CoreModule;
|
||||
import org.apache.skywalking.oap.server.core.cluster.ClusterModule;
|
||||
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
|
||||
import org.apache.skywalking.oap.server.library.module.ModuleStartException;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(NamingFactory.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
public class ClusterModuleNacosProviderTest {
|
||||
|
||||
private static final String SERVICE_NAME = "test-service_name";
|
||||
|
||||
private ClusterModuleNacosProvider provider = new ClusterModuleNacosProvider();
|
||||
|
||||
@Test
|
||||
public void name() {
|
||||
assertEquals("nacos", provider.name());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void module() {
|
||||
assertEquals(ClusterModule.class, provider.module());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createConfigBeanIfAbsent() {
|
||||
ModuleConfig moduleConfig = provider.createConfigBeanIfAbsent();
|
||||
assertTrue(moduleConfig instanceof ClusterModuleNacosConfig);
|
||||
}
|
||||
|
||||
@Test(expected = ModuleStartException.class)
|
||||
public void prepareWithNonHost() throws Exception {
|
||||
provider.prepare();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void prepare() throws Exception {
|
||||
PowerMockito.mockStatic(NamingFactory.class);
|
||||
ClusterModuleNacosConfig nacosConfig = new ClusterModuleNacosConfig();
|
||||
nacosConfig.setHostPort("10.0.0.1:1000,10.0.0.2:1001");
|
||||
nacosConfig.setServiceName(SERVICE_NAME);
|
||||
Whitebox.setInternalState(provider, "config", nacosConfig);
|
||||
NamingService namingService = mock(NamingService.class);
|
||||
|
||||
Properties properties = new Properties();
|
||||
properties.put(PropertyKeyConst.SERVER_ADDR, "10.0.0.1:1000,10.0.0.2:1001");
|
||||
|
||||
PowerMockito.when(NamingFactory.createNamingService(properties)).thenReturn(namingService);
|
||||
provider.prepare();
|
||||
ArgumentCaptor<Properties> addressCaptor = ArgumentCaptor.forClass(Properties.class);
|
||||
PowerMockito.verifyStatic();
|
||||
NamingFactory.createNamingService(addressCaptor.capture());
|
||||
Properties data = addressCaptor.getValue();
|
||||
assertEquals("10.0.0.1:1000,10.0.0.2:1001", data.getProperty(PropertyKeyConst.SERVER_ADDR));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void start() {
|
||||
provider.start();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void notifyAfterCompleted() {
|
||||
provider.notifyAfterCompleted();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requiredModules() {
|
||||
String[] modules = provider.requiredModules();
|
||||
assertArrayEquals(new String[] {CoreModule.NAME}, modules);
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,6 @@ package org.apache.skywalking.oap.server.configuration.consul;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import com.orbitz.consul.KeyValueClient;
|
||||
import com.orbitz.consul.cache.ConsulCache;
|
||||
import com.orbitz.consul.cache.KVCache;
|
||||
import com.orbitz.consul.model.kv.ImmutableValue;
|
||||
|
|
@ -35,6 +34,7 @@ import org.mockito.ArgumentCaptor;
|
|||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
|
@ -48,6 +48,13 @@ import static org.mockito.Mockito.when;
|
|||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(KVCache.class)
|
||||
@PowerMockIgnore({
|
||||
"com.sun.org.apache.xerces.*",
|
||||
"javax.xml.*",
|
||||
"org.xml.*",
|
||||
"javax.management.*",
|
||||
"org.w3c.*"
|
||||
})
|
||||
@SuppressWarnings({
|
||||
"unchecked",
|
||||
"OptionalGetWithoutIsPresent"
|
||||
|
|
@ -77,8 +84,8 @@ public class ConsulConfigurationWatcherRegisterTest {
|
|||
ArgumentCaptor<ConsulCache.Listener> listener2 = ArgumentCaptor.forClass(ConsulCache.Listener.class);
|
||||
|
||||
PowerMockito.mockStatic(KVCache.class);
|
||||
PowerMockito.when(KVCache.newCache(any(KeyValueClient.class), eq("key1"))).thenReturn(cache1);
|
||||
PowerMockito.when(KVCache.newCache(any(KeyValueClient.class), eq("key2"))).thenReturn(cache2);
|
||||
PowerMockito.when(KVCache.newCache(any(), eq("key1"))).thenReturn(cache1);
|
||||
PowerMockito.when(KVCache.newCache(any(), eq("key2"))).thenReturn(cache2);
|
||||
|
||||
when(register.readConfig(any(Set.class))).thenCallRealMethod();
|
||||
|
||||
|
|
@ -128,8 +135,8 @@ public class ConsulConfigurationWatcherRegisterTest {
|
|||
ArgumentCaptor<ConsulCache.Listener> listener2 = ArgumentCaptor.forClass(ConsulCache.Listener.class);
|
||||
|
||||
PowerMockito.mockStatic(KVCache.class);
|
||||
PowerMockito.when(KVCache.newCache(any(KeyValueClient.class), eq("key1"))).thenReturn(cache1);
|
||||
PowerMockito.when(KVCache.newCache(any(KeyValueClient.class), eq("key2"))).thenReturn(cache2);
|
||||
PowerMockito.when(KVCache.newCache(any(), eq("key1"))).thenReturn(cache1);
|
||||
PowerMockito.when(KVCache.newCache(any(), eq("key2"))).thenReturn(cache2);
|
||||
|
||||
when(register.readConfig(any(Set.class))).thenCallRealMethod();
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,19 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${compiler.version}</source>
|
||||
<target>${compiler.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>CI-with-IT</id>
|
||||
|
|
|
|||
|
|
@ -1,134 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.oap.server.configuration.etcd;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import mousio.client.promises.ResponsePromise;
|
||||
import mousio.etcd4j.EtcdClient;
|
||||
import mousio.etcd4j.promises.EtcdResponsePromise;
|
||||
import mousio.etcd4j.requests.EtcdKeyGetRequest;
|
||||
import mousio.etcd4j.responses.EtcdKeysResponse;
|
||||
import org.apache.skywalking.oap.server.configuration.api.ConfigTable;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.powermock.api.mockito.PowerMockito.mock;
|
||||
import static org.powermock.api.mockito.PowerMockito.mockStatic;
|
||||
import static org.powermock.api.mockito.PowerMockito.when;
|
||||
import static org.powermock.api.mockito.PowerMockito.whenNew;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({
|
||||
EtcdKeysResponse.class,
|
||||
EtcdUtils.class,
|
||||
EtcdClient.class,
|
||||
URI.class
|
||||
})
|
||||
@PowerMockIgnore({"javax.management.*"})
|
||||
public class EtcdConfigWatcherRegisterTest {
|
||||
|
||||
@Before
|
||||
@Test
|
||||
public void shouldReadConfigs() throws Exception {
|
||||
final String group = "skywalking";
|
||||
final String testKey1 = "receiver-trace.default.slowDBAccessThreshold";
|
||||
final String testVal1 = "test";
|
||||
final String testKey2 = "testKey";
|
||||
final String testVal2 = "testVal";
|
||||
|
||||
final EtcdServerSettings mockSettings = mock(EtcdServerSettings.class);
|
||||
when(mockSettings.getGroup()).thenReturn(group);
|
||||
mockStatic(EtcdUtils.class);
|
||||
|
||||
List<URI> uris = mock(List.class);
|
||||
when(EtcdUtils.parse(any())).thenReturn(uris);
|
||||
|
||||
final EtcdClient client = PowerMockito.mock(EtcdClient.class);
|
||||
whenNew(EtcdClient.class).withAnyArguments().thenReturn(client);
|
||||
|
||||
String port = System.getProperty("etcd.port");
|
||||
URI uri = new URI("http://localhost:" + port);
|
||||
List<URI> urisArray = spy(ArrayList.class);
|
||||
urisArray.add(uri);
|
||||
URI[] array = urisArray.toArray(new URI[] {});
|
||||
when(uris.toArray(new URI[] {})).thenReturn(array);
|
||||
|
||||
final EtcdConfigWatcherRegister mockRegister = spy(new EtcdConfigWatcherRegister(mockSettings));
|
||||
|
||||
Whitebox.setInternalState(mockRegister, "client", client);
|
||||
Whitebox.setInternalState(mockRegister, "settings", mockSettings);
|
||||
|
||||
final EtcdKeysResponse response = PowerMockito.mock(EtcdKeysResponse.class);
|
||||
final EtcdKeysResponse response1 = PowerMockito.mock(EtcdKeysResponse.class);
|
||||
|
||||
final EtcdKeyGetRequest request = PowerMockito.mock(EtcdKeyGetRequest.class);
|
||||
|
||||
when(client.get("/skywalking/receiver-trace.default.slowDBAccessThreshold")).thenReturn(request);
|
||||
when(request.waitForChange()).thenReturn(request);
|
||||
|
||||
final EtcdResponsePromise<EtcdKeysResponse> promise = mock(EtcdResponsePromise.class);
|
||||
final ResponsePromise<EtcdKeysResponse> responseResponsePromise = mock(ResponsePromise.class);
|
||||
when(request.send()).thenReturn(promise);
|
||||
when(promise.get()).thenReturn(response);
|
||||
when(responseResponsePromise.get()).thenReturn(response);
|
||||
|
||||
final EtcdKeysResponse.EtcdNode node = mock(EtcdKeysResponse.EtcdNode.class);
|
||||
when(response.getNode()).thenReturn(node);
|
||||
when(node.getKey()).thenReturn("/skywalking/receiver-trace.default.slowDBAccessThreshold");
|
||||
when(node.getValue()).thenReturn("test");
|
||||
|
||||
final EtcdKeyGetRequest request1 = mock(EtcdKeyGetRequest.class);
|
||||
when(client.get("/skywalking/testKey")).thenReturn(request1);
|
||||
when(request1.waitForChange()).thenReturn(request1);
|
||||
final EtcdResponsePromise<EtcdKeysResponse> promise1 = mock(EtcdResponsePromise.class);
|
||||
final ResponsePromise<EtcdKeysResponse> responseResponsePromise1 = mock(ResponsePromise.class);
|
||||
when(request1.send()).thenReturn(promise1);
|
||||
when(promise1.get()).thenReturn(response1);
|
||||
when(responseResponsePromise1.get()).thenReturn(response1);
|
||||
|
||||
final EtcdKeysResponse.EtcdNode node1 = mock(EtcdKeysResponse.EtcdNode.class);
|
||||
when(response1.getNode()).thenReturn(node1);
|
||||
when(node1.getKey()).thenReturn("/skywalking/testKey");
|
||||
when(node1.getValue()).thenReturn("testVal");
|
||||
|
||||
final ConfigTable configTable = mockRegister.readConfig(Sets.newHashSet(testKey1, testKey2)).get();
|
||||
|
||||
assertEquals(2, configTable.getItems().size());
|
||||
Map<String, String> kvs = new HashMap<>();
|
||||
for (ConfigTable.ConfigItem item : configTable.getItems()) {
|
||||
kvs.put(item.getName(), item.getValue());
|
||||
}
|
||||
assertEquals(testVal1, kvs.get(testKey1));
|
||||
assertEquals(testVal2, kvs.get(testKey2));
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
|
|||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
@PrepareForTest({ConfigurationConfigmapInformer.class})
|
||||
public class ConfigmapConfigWatcherRegisterTest {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import static org.junit.Assert.assertEquals;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore("javax.management.*")
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class ConfigmapConfigurationProviderTest {
|
||||
|
||||
private final ConfigmapConfigurationProvider provider = new ConfigmapConfigurationProvider();
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ public class TimeBucketTest {
|
|||
DownSampling.Day,
|
||||
DAYS,
|
||||
MILLISECONDS.toDays(NOW)
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private DownSampling downSampling;
|
||||
|
|
|
|||
|
|
@ -35,11 +35,13 @@ import org.junit.BeforeClass;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({DefaultScopeDefine.class})
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class StorageModelsTest {
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>server-library</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
|
|
@ -30,7 +31,6 @@
|
|||
|
||||
<properties>
|
||||
<ststem-rules.version>1.18.0</ststem-rules.version>
|
||||
<protobuf-java.version>3.11.4</protobuf-java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -57,7 +57,6 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>${protobuf-java.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -46,10 +46,14 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<version>${protobuf-java-util.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency> <!-- necessary for Java 9+ -->
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>annotations-api</artifactId>
|
||||
<version>${org.apache.tomcat.annotations-api.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
@ -36,14 +36,14 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore({"javax.management.*"})
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class BrowserReportServletHandlerTest {
|
||||
@Mock
|
||||
private HttpServletRequest request;
|
||||
|
|
|
|||
|
|
@ -40,14 +40,14 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PowerMockIgnore({"javax.management.*"})
|
||||
@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
|
||||
public class TraceSegmentReportServletHandlerTest {
|
||||
|
||||
@Mock
|
||||
|
|
@ -71,7 +71,7 @@ public class TraceSegmentReportServletHandlerTest {
|
|||
Mockito.when(moduleManager.find(AnalyzerModule.NAME)).thenReturn(analyzerModule);
|
||||
|
||||
Mockito.when(telemetryProvider.getService(MetricsCreator.class))
|
||||
.thenReturn(new MetricsCreatorNoop());
|
||||
.thenReturn(new MetricsCreatorNoop());
|
||||
|
||||
when(analyzerModuleProvider.getService(ISegmentParserService.class))
|
||||
.thenReturn(new SegmentParserServiceImpl(moduleManager, new AnalyzerModuleConfig()));
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.util.reflection.Whitebox;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import org.powermock.reflect.Whitebox;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
|
|
|
|||
52
pom.xml
52
pom.xml
|
|
@ -182,19 +182,25 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
<powermock.version>1.6.4</powermock.version>
|
||||
<powermock.version>2.0.7</powermock.version>
|
||||
<checkstyle.version>6.18</checkstyle.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<mockito-all.version>1.10.19</mockito-all.version>
|
||||
<mockito-core.version>3.5.13</mockito-core.version>
|
||||
<lombok.version>1.18.10</lombok.version>
|
||||
|
||||
<!-- core lib dependency -->
|
||||
<grpc.version>1.26.0</grpc.version>
|
||||
<bytebuddy.version>1.10.16</bytebuddy.version>
|
||||
<grpc.version>1.32.1</grpc.version>
|
||||
<gson.version>2.8.6</gson.version>
|
||||
<os-maven-plugin.version>1.6.2</os-maven-plugin.version>
|
||||
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
|
||||
<com.google.protobuf.protoc.version>3.3.0</com.google.protobuf.protoc.version>
|
||||
<protoc-gen-grpc-java.plugin.version>1.8.0</protoc-gen-grpc-java.plugin.version>
|
||||
<com.google.protobuf.protoc.version>3.12.0</com.google.protobuf.protoc.version>
|
||||
<protoc-gen-grpc-java.plugin.version>1.32.1</protoc-gen-grpc-java.plugin.version>
|
||||
<netty-tcnative-boringssl-static.version>2.0.26.Final</netty-tcnative-boringssl-static.version>
|
||||
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
|
||||
<objenesis.version>3.1</objenesis.version>
|
||||
<!-- necessary for Java 9+ -->
|
||||
<org.apache.tomcat.annotations-api.version>6.0.53</org.apache.tomcat.annotations-api.version>
|
||||
|
||||
<!-- Plugin versions -->
|
||||
<docker.plugin.version>0.4.13</docker.plugin.version>
|
||||
|
|
@ -219,7 +225,6 @@
|
|||
<gmaven-plugin.version>1.5</gmaven-plugin.version>
|
||||
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
|
||||
<checkstyle.fails.on.error>true</checkstyle.fails.on.error>
|
||||
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -228,11 +233,6 @@
|
|||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-junit4</artifactId>
|
||||
|
|
@ -240,7 +240,17 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<artifactId>powermock-api-mockito2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.objenesis</groupId>
|
||||
<artifactId>objenesis</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -275,8 +285,8 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>${mockito-all.version}</version>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>${mockito-core.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -287,10 +297,22 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<artifactId>powermock-api-mockito2</artifactId>
|
||||
<version>${powermock.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
<version>${bytebuddy.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.objenesis</groupId>
|
||||
<artifactId>objenesis</artifactId>
|
||||
<version>${objenesis.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
<spring-boot-version>2.1.6.RELEASE</spring-boot-version>
|
||||
<test.framework.version>2.8.5</test.framework.version>
|
||||
<docker.image.version>${test.framework.version}</docker.image.version>
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
|
||||
<test.framework.version>1.4.20</test.framework.version>
|
||||
<spring-boot-version>2.1.6.RELEASE</spring-boot-version>
|
||||
</properties>
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ freemarker-2.3.28.jar
|
|||
graphql-java-8.0.jar
|
||||
graphql-java-tools-5.2.3.jar
|
||||
groovy-3.0.3.jar
|
||||
grpc-api-1.26.0.jar
|
||||
grpc-context-1.26.0.jar
|
||||
grpc-core-1.26.0.jar
|
||||
grpc-netty-1.26.0.jar
|
||||
grpc-protobuf-1.26.0.jar
|
||||
grpc-protobuf-lite-1.26.0.jar
|
||||
grpc-stub-1.26.0.jar
|
||||
grpc-api-1.32.1.jar
|
||||
grpc-context-1.32.1.jar
|
||||
grpc-core-1.32.1.jar
|
||||
grpc-netty-1.32.1.jar
|
||||
grpc-protobuf-1.32.1.jar
|
||||
grpc-protobuf-lite-1.32.1.jar
|
||||
grpc-stub-1.32.1.jar
|
||||
gson-2.8.6.jar
|
||||
gson-fire-1.8.3.jar
|
||||
guava-28.1-jre.jar
|
||||
|
|
@ -131,24 +131,22 @@ netty-buffer-4.1.42.Final.jar
|
|||
netty-codec-4.1.42.Final.jar
|
||||
netty-codec-dns-4.1.42.Final.jar
|
||||
netty-codec-http-4.1.42.Final.jar
|
||||
netty-codec-http2-4.1.42.Final.jar
|
||||
netty-codec-socks-4.1.42.Final.jar
|
||||
netty-codec-http2-4.1.51.Final.jar
|
||||
netty-codec-socks-4.1.51.Final.jar
|
||||
netty-common-4.1.42.Final.jar
|
||||
netty-handler-4.1.42.Final.jar
|
||||
netty-handler-proxy-4.1.42.Final.jar
|
||||
netty-handler-proxy-4.1.51.Final.jar
|
||||
netty-resolver-4.1.42.Final.jar
|
||||
netty-resolver-dns-4.1.42.Final.jar
|
||||
netty-tcnative-boringssl-static-2.0.26.Final.jar
|
||||
netty-transport-4.1.42.Final.jar
|
||||
okhttp-3.9.0.jar
|
||||
okio-1.13.0.jar
|
||||
opencensus-api-0.24.0.jar
|
||||
opencensus-contrib-grpc-metrics-0.24.0.jar
|
||||
parent-join-client-7.0.0.jar
|
||||
perfmark-api-0.19.0.jar
|
||||
proto-google-common-protos-1.12.0.jar
|
||||
protobuf-java-3.11.4.jar
|
||||
protobuf-java-util-3.11.4.jar
|
||||
proto-google-common-protos-1.17.0.jar
|
||||
protobuf-java-3.13.0.jar
|
||||
protobuf-java-util-3.12.4.jar
|
||||
rank-eval-client-7.0.0.jar
|
||||
reactive-streams-1.0.2.jar
|
||||
reflectasm-1.11.7.jar
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@ freemarker-2.3.28.jar
|
|||
graphql-java-8.0.jar
|
||||
graphql-java-tools-5.2.3.jar
|
||||
groovy-3.0.3.jar
|
||||
grpc-api-1.26.0.jar
|
||||
grpc-context-1.26.0.jar
|
||||
grpc-core-1.26.0.jar
|
||||
grpc-netty-1.26.0.jar
|
||||
grpc-protobuf-1.26.0.jar
|
||||
grpc-protobuf-lite-1.26.0.jar
|
||||
grpc-stub-1.26.0.jar
|
||||
grpc-api-1.32.1.jar
|
||||
grpc-context-1.32.1.jar
|
||||
grpc-core-1.32.1.jar
|
||||
grpc-netty-1.32.1.jar
|
||||
grpc-protobuf-1.32.1.jar
|
||||
grpc-protobuf-lite-1.32.1.jar
|
||||
grpc-stub-1.32.1.jar
|
||||
gson-2.8.6.jar
|
||||
gson-fire-1.8.3.jar
|
||||
guava-28.1-jre.jar
|
||||
|
|
@ -129,24 +129,22 @@ netty-buffer-4.1.42.Final.jar
|
|||
netty-codec-4.1.42.Final.jar
|
||||
netty-codec-dns-4.1.42.Final.jar
|
||||
netty-codec-http-4.1.42.Final.jar
|
||||
netty-codec-http2-4.1.42.Final.jar
|
||||
netty-codec-socks-4.1.42.Final.jar
|
||||
netty-codec-http2-4.1.51.Final.jar
|
||||
netty-codec-socks-4.1.51.Final.jar
|
||||
netty-common-4.1.42.Final.jar
|
||||
netty-handler-4.1.42.Final.jar
|
||||
netty-handler-proxy-4.1.42.Final.jar
|
||||
netty-handler-proxy-4.1.51.Final.jar
|
||||
netty-resolver-4.1.42.Final.jar
|
||||
netty-resolver-dns-4.1.42.Final.jar
|
||||
netty-tcnative-boringssl-static-2.0.26.Final.jar
|
||||
netty-transport-4.1.42.Final.jar
|
||||
okhttp-3.9.0.jar
|
||||
okio-1.13.0.jar
|
||||
opencensus-api-0.24.0.jar
|
||||
opencensus-contrib-grpc-metrics-0.24.0.jar
|
||||
parent-join-client-6.3.2.jar
|
||||
perfmark-api-0.19.0.jar
|
||||
proto-google-common-protos-1.12.0.jar
|
||||
protobuf-java-3.11.4.jar
|
||||
protobuf-java-util-3.11.4.jar
|
||||
proto-google-common-protos-1.17.0.jar
|
||||
protobuf-java-3.13.0.jar
|
||||
protobuf-java-util-3.12.4.jar
|
||||
rank-eval-client-6.3.2.jar
|
||||
reactive-streams-1.0.2.jar
|
||||
reflectasm-1.11.7.jar
|
||||
|
|
|
|||
Loading…
Reference in New Issue