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

Split unit test #14645

Draft
wants to merge 3 commits into
base: 3.3
Choose a base branch
from
Draft
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
513 changes: 261 additions & 252 deletions .github/workflows/build-and-test-pr.yml

Large diffs are not rendered by default.

572 changes: 294 additions & 278 deletions .github/workflows/build-and-test-scheduled-3.1.yml

Large diffs are not rendered by default.

570 changes: 293 additions & 277 deletions .github/workflows/build-and-test-scheduled-3.2.yml

Large diffs are not rendered by default.

582 changes: 158 additions & 424 deletions .github/workflows/build-and-test-scheduled-3.3.yml

Large diffs are not rendered by default.

555 changes: 287 additions & 268 deletions .github/workflows/release-test.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dubbo-common/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
<Logger name="org.apache.dubbo.rpc.protocol.tri.stream.StreamUtils" level="warn"/>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static void putHeader(BiConsumer<CharSequence, String> consumer, String
String str = encodeBase64ASCII((byte[]) value);
consumer.accept(key + TripleConstants.HEADER_BIN_SUFFIX, str);
} else {
LOGGER.warn(
LOGGER.info(
PROTOCOL_UNSUPPORTED,
"",
"",
Expand Down
42 changes: 42 additions & 0 deletions dubbo-test/scripts/split-modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
#
# 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.
#

readarray -t modules < <(find . -name "pom.xml" | while read -r pom; do
module_dir=$(dirname "$pom")
if [ -d "$module_dir/src/test" ] && [[ "$module_dir" != *"plugin-loom" ]] && [[ "$module_dir" != *"config-spring6" ]]; then
echo "${module_dir#./}"
fi
done)

readarray -t modules < <(printf '%s\n' "${modules[@]}" | shuf --random-source=<(yes 1))

jobs=$1
jobs_dir=$2/test/jobs

total=${#modules[@]}
size=$((total / jobs))
remainder=$((total % jobs))

mkdir -p "$jobs_dir"

IFS=','
for ((i=0; i<jobs; i++)); do
start=$((i * size + (i < remainder ? i : remainder)))
end=$((start + size + (i < remainder ? 1 : 0)))
echo "${modules[*]:start:end-start}" > "$jobs_dir/test_modules_$((i+1)).txt"
done
2 changes: 1 addition & 1 deletion mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ else
else
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar"
fi
while IFS="=" read key value; do
while IFS='=\r' read key value; do
case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
Expand Down
Loading