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

【doc】add auto test doc #973

Merged
merged 1 commit into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/dubbo_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- develop
paths:
- 'sermant-agentcore/**'
- 'sermant-integration-tests/**'
- 'sermant-plugins/sermant-dynamic-config/**'
- 'sermant-plugins/sermant-flowcontrol/**'
- 'sermant-plugins/sermant-loadbalancer/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/spring_integration_test_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- develop
paths:
- 'sermant-agentcore/**'
- 'sermant-integration-tests/**'
- 'sermant-plugins/sermant-dynamic-config/**'
- 'sermant-plugins/sermant-flowcontrol/**'
- 'sermant-plugins/sermant-loadbalancer/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/spring_integration_test_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- develop
paths:
- 'sermant-agentcore/**'
- 'sermant-integration-tests/**'
- 'sermant-plugins/sermant-router/**'
- 'sermant-plugins/sermant-springboot-registry/**'
- '.github/workflows/spring_integration*.yaml'
Expand Down
510 changes: 510 additions & 0 deletions sermant-integration-tests/README-zh.md

Large diffs are not rendered by default.

508 changes: 508 additions & 0 deletions sermant-integration-tests/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class ChainContext {
private static final ThreadLocal<Map<String, RequestContext>> THREAD_LOCAL_CONTEXT_MAP = new ThreadLocal<>();

private static final int MAX_SIZE = 4;
private static final int MAX_SIZE = 8;

private ChainContext() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.huawei.flowcontrol.common.entity.HttpRequestEntity.Builder;
import com.huawei.flowcontrol.common.entity.RequestEntity;
import com.huawei.flowcontrol.common.entity.RequestEntity.RequestType;
import com.huawei.fowcontrol.res4j.chain.context.ChainContext;

import com.huaweicloud.sermant.core.operation.OperationManager;
import com.huaweicloud.sermant.core.operation.converter.api.YamlConverter;
Expand Down Expand Up @@ -85,6 +86,7 @@ public void setUp() {
public void close() {
pluginConfigManagerMockedStatic.close();
operationManagerMockedStatic.close();
ChainContext.remove();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public void getThreadLocalContext() {
ChainContext.getThreadLocalContext("test1");
ChainContext.getThreadLocalContext("test12");
ChainContext.getThreadLocalContext("test123");
ChainContext.getThreadLocalContext("test124");
ChainContext.getThreadLocalContext("test125");
ChainContext.getThreadLocalContext("test126");
ChainContext.getThreadLocalContext("test127");
try {
ChainContext.getThreadLocalContext("test5");
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.huawei.flowcontrol.common.core.ResolverManager;
import com.huawei.flowcontrol.common.core.match.MatchGroupResolver;
import com.huawei.fowcontrol.res4j.chain.HandlerChainEntry;
import com.huawei.fowcontrol.res4j.chain.context.ChainContext;

import com.huaweicloud.sermant.core.operation.OperationManager;
import com.huaweicloud.sermant.core.operation.converter.api.YamlConverter;
Expand Down Expand Up @@ -88,6 +89,7 @@ private String buildKey(String prefix) {
public void close() {
pluginConfigManagerMockedStatic.close();
operationManagerMockedStatic.close();
ChainContext.remove();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.huawei.flowcontrol.common.config.FlowControlConfig;
import com.huawei.flowcontrol.common.entity.FlowControlResult;
import com.huawei.flowcontrol.common.entity.HttpRequestEntity;
import com.huawei.fowcontrol.res4j.chain.context.ChainContext;

import com.huaweicloud.sermant.core.operation.OperationManager;
import com.huaweicloud.sermant.core.operation.converter.api.YamlConverter;
Expand Down Expand Up @@ -74,5 +75,6 @@ public void test() {
public void clear() {
pluginConfigManagerMockedStatic.close();
operationManagerMockedStatic.close();
ChainContext.remove();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.huawei.flowcontrol.common.config.FlowControlConfig;
import com.huawei.flowcontrol.common.entity.FlowControlResult;
import com.huawei.flowcontrol.common.entity.HttpRequestEntity;
import com.huawei.fowcontrol.res4j.chain.context.ChainContext;

import com.huaweicloud.sermant.core.operation.OperationManager;
import com.huaweicloud.sermant.core.operation.converter.api.YamlConverter;
Expand Down Expand Up @@ -69,5 +70,6 @@ public void test() {
public void clear() {
pluginConfigManagerMockedStatic.close();
operationManagerMockedStatic.close();
ChainContext.remove();
}
}