Skip to content

Commit

Permalink
Merge pull request #973 from justforstudy-A/auto-test-doc-v2
Browse files Browse the repository at this point in the history
【doc】add auto test doc
  • Loading branch information
robotLJW authored Nov 25, 2022
2 parents 6133b39 + dd0c4e1 commit 4804c3f
Show file tree
Hide file tree
Showing 11 changed files with 1,034 additions and 1 deletion.
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();
}
}

0 comments on commit 4804c3f

Please sign in to comment.