Skip to content
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
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ jobs:
if-no-files-found: error
path: |
lib/java/build/functionalTestJar/
lib/java/build/runnonblockingclient
lib/java/build/runclient
lib/java/build/runnonblockingserver
lib/java/build/runserver
Expand Down Expand Up @@ -320,21 +321,21 @@ jobs:
- name: Set up .NET SDK (via install script)
run: |
# remove any existing install
sudo apt remove dotnet*
sudo apt remove dotnet*
# install key
sudo apt install gpg
wget https://dot.net/v1/dotnet-install.asc
gpg --import dotnet-install.asc
gpg --import dotnet-install.asc
# download and verify
wget https://dot.net/v1/dotnet-install.sh
wget https://dot.net/v1/dotnet-install.sig
gpg --verify dotnet-install.sig dotnet-install.sh
gpg --verify dotnet-install.sig dotnet-install.sh
# run install script
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 10.0
./dotnet-install.sh --channel 10.0
# export env vars
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
dotnet --list-sdks

# the sdk is installed by default, but keep this step for reference
Expand Down Expand Up @@ -661,7 +662,7 @@ jobs:
# kotlin cross test are failing -> see THRIFT-5879
server_lang: ['java', 'go', 'rs', 'cpp']
# we always use comma join as many client langs as possible, to reduce the number of jobs
client_lang: ['java', 'go,rs,cpp']
client_lang: ['java,kotlin', 'go,rs,cpp']
fail-fast: false
steps:
- uses: actions/checkout@v6
Expand Down
22 changes: 21 additions & 1 deletion lib/java/gradle/functionalTests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
shadowJar {
description = 'Assemble a test JAR file for cross-check execution'
// make sure the runners are created when this runs
dependsOn 'generateRunnerScriptForClient', 'generateRunnerScriptForServer', 'generateRunnerScriptForNonblockingServer', 'generateRunnerScriptForTServletServer'
dependsOn 'generateRunnerScriptForClient', 'generateRunnerScriptForNonblockingClient', 'generateRunnerScriptForServer', 'generateRunnerScriptForNonblockingServer', 'generateRunnerScriptForTServletServer'
archiveBaseName.set('functionalTest')
destinationDirectory = file("$buildDir/functionalTestJar")
// We do not need a version number for this internal jar
Expand Down Expand Up @@ -119,6 +119,26 @@ ${scriptHead}
}
}

task generateRunnerScriptForNonblockingClient(group: 'Build') {
description = 'Generate a runner script for cross-check tests with TestNonblockingClient'

def clientFile = file("$buildDir/runnonblockingclient${scriptExt}")

def runClientText = """\
${scriptHead}

"${javaExe}" -cp "$jarPath" "-Djavax.net.ssl.keyStore=$clientKeyStore" -Djavax.net.ssl.keyStorePassword=thrift "-Djavax.net.ssl.trustStore=$trustStore" -Djavax.net.ssl.trustStorePassword=thrift org.apache.thrift.test.TestNonblockingClient $args
"""
inputs.property 'runClientText', runClientText
outputs.file clientFile

doLast {
clientFile.parentFile.mkdirs()
clientFile.text = runClientText
clientFile.setExecutable(true, false)
}
}

task generateRunnerScriptForServer(group: 'Build') {
description = 'Generate a runner script for cross-check tests with TestServer'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
*/
public class TestClient {

private static int ERR_BASETYPES = 1;
private static int ERR_STRUCTS = 2;
private static int ERR_CONTAINERS = 4;
private static int ERR_EXCEPTIONS = 8;
private static int ERR_PROTOCOLS = 16;
private static int ERR_UNKNOWN = 64;
static int ERR_BASETYPES = 1;
static int ERR_STRUCTS = 2;
static int ERR_CONTAINERS = 4;
static int ERR_EXCEPTIONS = 8;
static int ERR_PROTOCOLS = 16;
static int ERR_UNKNOWN = 64;

public static void main(String[] args) {
String host = "localhost";
Expand Down Expand Up @@ -819,7 +819,7 @@ public static void main(String[] args) {
System.exit(returnCode);
}

private static byte[] getBytesData() {
static byte[] getBytesData() {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(256);
IntStream.range(-128, 128).forEach(byteArrayOutputStream::write);
return byteArrayOutputStream.toByteArray();
Expand Down
Loading
Loading