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

Execute tests for MacOS and Windows using local instances of ZooKeeper and Apache Kafka #509

Merged
merged 53 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5045883
Added MacOS and Windows test using a local version of Apache Kafka se…
masesdevelopers Jun 25, 2024
6a6b785
up
masesdevelopers Jun 25, 2024
bd5dc20
Add SerDes test
masesdevelopers Jun 25, 2024
05263be
Reduced matrix size
masesdevelopers Jun 25, 2024
12d400f
Double wait time
masesdevelopers Jun 25, 2024
f79ed0e
Changed cycle check and wait subscription
masesdevelopers Jun 25, 2024
556dec6
Fix windows execution
masesdevelopers Jun 25, 2024
36bcf48
Fix condition
masesdevelopers Jun 25, 2024
5bdfc26
Update path and expiration time
masesdevelopers Jun 25, 2024
a36dbbd
Added logs
masesdevelopers Jun 25, 2024
95dd108
Report exception callstack
masesdevelopers Jun 25, 2024
33da6dd
Do not emit error if some element were received
masesdevelopers Jun 25, 2024
4f7330e
Add specific error for GlobalInstance
masesdevelopers Jun 25, 2024
6d69abb
Fully reviewed test folder
masesdevelopers Jun 25, 2024
4a4a7ff
Added check
masesdevelopers Jun 25, 2024
c72ac03
Force Globalize
masesdevelopers Jun 25, 2024
34195a5
Use current version of KNetCLI
masesdevelopers Jun 25, 2024
633c701
Verify global instance
masesdevelopers Jun 25, 2024
4e29e79
Change execution order
masesdevelopers Jun 25, 2024
5dabe15
Path fix
masesdevelopers Jun 25, 2024
df2ea36
Name fix
masesdevelopers Jun 25, 2024
a32054f
Added final cleanup
masesdevelopers Jun 26, 2024
536bff8
Merge remote-tracking branch 'upstream/master' into 480-add-test-exec…
masesdevelopers Jun 26, 2024
030aefe
Added checkout
masesdevelopers Jun 26, 2024
9546d35
Added confirm
masesdevelopers Jun 26, 2024
54517b0
Split cache by framework
masesdevelopers Jun 26, 2024
007a94c
Name fix
masesdevelopers Jun 26, 2024
ec64efc
Conf
masesdevelopers Jun 26, 2024
a3839f7
Avoid error
masesdevelopers Jun 26, 2024
1be38e9
Added logs
masesdevelopers Jun 26, 2024
16d7184
Always upload
masesdevelopers Jun 26, 2024
1fd6fd8
File rename
masesdevelopers Jun 26, 2024
a24a4aa
Fix path
masesdevelopers Jun 26, 2024
64e7850
change
masesdevelopers Jun 26, 2024
182a291
Update for wrong param
masesdevelopers Jun 26, 2024
98b1a7f
Report only on failed
masesdevelopers Jun 26, 2024
aa148ff
start process depends on framework
masesdevelopers Jun 26, 2024
6248b72
Escape on windows
masesdevelopers Jun 26, 2024
0bc1c08
fix condition
masesdevelopers Jun 26, 2024
17e64f1
Update path
masesdevelopers Jun 26, 2024
abeb8de
Try Start-Job since most probably child process dies when the father …
masesdevelopers Jun 26, 2024
7ccd129
Use batch
masesdevelopers Jun 26, 2024
0c470c0
try in the same shell
masesdevelopers Jun 26, 2024
af0d005
Try avoid log clean in Windows due to concurrent use of resources
masesdevelopers Jun 26, 2024
b55cf93
Disable log cleaner in windows to avoid concurrence on file access
masesdevelopers Jun 26, 2024
dcc8c2e
Compile only tests to avoid version clash of Newtonsoft.Json
masesdevelopers Jun 26, 2024
accd244
Change the way the test exit
masesdevelopers Jun 26, 2024
d104943
Forcibly added Newtonsoft.Json to avoid version clash
masesdevelopers Jun 26, 2024
5353f94
fix
masesdevelopers Jun 26, 2024
ae98300
Disable KNetSerDesTest on net462
masesdevelopers Jun 26, 2024
09b650f
Moved out serdes tests from Main to execute static initializer later
masesdevelopers Jun 26, 2024
182e91b
Remove condition
masesdevelopers Jun 26, 2024
5879d8a
Report error condition
masesdevelopers Jun 26, 2024
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
230 changes: 204 additions & 26 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,59 @@ jobs:
env:
GITHUB_TEST_PREPARATION: true

- name: Save KNet bin in cache
- name: Prepare configuration files
run: |
Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net462\zookeeper.properties -Force
Copy-Item src\container\config_container\server.properties -Destination bin\net462\server.properties -Force
Copy-Item src\config\log4j.properties -Destination bin\net462\log4j.properties -Force
Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net6.0\zookeeper.properties -Force
Copy-Item src\container\config_container\server.properties -Destination bin\net6.0\server.properties -Force
Copy-Item src\config\log4j.properties -Destination bin\net6.0\log4j.properties -Force
Copy-Item src\container\config_container\zookeeper.properties -Destination bin\net8.0\zookeeper.properties -Force
Copy-Item src\container\config_container\server.properties -Destination bin\net8.0\server.properties -Force
Copy-Item src\config\log4j.properties -Destination bin\net8.0\log4j.properties -Force

- name: Save KNet net462 bin in cache
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
path: ./bin/net462/
key: KNet_net462_bin_${{ github.sha }}

- name: Save KNet net6.0 bin in cache
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
path: ./bin/net6.0/
key: KNet_net6.0_bin_${{ github.sha }}

- name: Save KNet net8.0 bin in cache
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
path: ./bin/net8.0/
key: KNet_net8.0_bin_${{ github.sha }}

- name: Save KNet net462 binCLI in cache
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
path: ./bin/
key: KNet_bin_${{ github.sha }}
path: ./binCLI/net462/
key: KNet_net462_binCLI_${{ github.sha }}

- name: Save KNet net6.0 binCLI in cache
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
path: ./binCLI/net6.0/
key: KNet_net6.0_binCLI_${{ github.sha }}

- name: Save KNet net8.0 binCLI in cache
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
path: ./binCLI/net8.0/
key: KNet_net8.0_binCLI_${{ github.sha }}

build_container_knettest:
needs: check_changes
Expand Down Expand Up @@ -262,7 +309,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

execute_KNetTest:
execute_KNetTest_linux:
needs: [build_windows, build_container_knettest]
services:
kafka:
Expand All @@ -274,55 +321,50 @@ jobs:
ports:
- 9092:9092
env:
KNET_RUNNING_MODE: server
KNET_DOCKER_RUNNING_MODE: server
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ] #, 'macos-latest', 'macos-13' , 'windows-latest' ]
framework: [ 'net462', 'net6.0', 'net8.0' ]
framework: [ 'net6.0', 'net8.0' ]
buffered: [ 'runBuffered', '']
extraValue: [ '', 'withBigExtraValue', 'withBigBigExtraValue' ]
jdk_vendor: [ 'temurin', 'zulu', 'microsoft', 'corretto', 'oracle']
extraValue: [ '', 'withBigBigExtraValue' ]
jdk_vendor: [ 'temurin', 'zulu', 'oracle'] #removed 'microsoft', 'corretto', to reduce matrix size
jdk_version: [ '11', '17', '21' ] # only LTS versions
exclude:
- os: ubuntu-latest
framework: net462
- os: macos-latest
framework: net462
- os: macos-latest
framework: net6.0
- os: macos-13
framework: net462
- os: macos-13
framework: net6.0
- jdk_vendor: oracle
jdk_version: 11

runs-on: ${{ matrix.os }}
steps:
- name: Restore KNet bin from cache
- name: Restore KNet ${{ matrix.framework }} bin from cache
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
enableCrossOsArchive: true
path: ./bin/
key: KNet_bin_${{ github.sha }}
path: ./bin/${{ matrix.framework }}/
key: KNet_${{ matrix.framework }}_bin_${{ github.sha }}

- name: Set up JDK distribution
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: ${{ matrix.jdk_vendor }}
java-version: ${{ matrix.jdk_version }}

- name: Executing KNetTest on Ubuntu with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
- name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13' }}
continue-on-error: true
run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }}
run: dotnet ./bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }}
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
shell: pwsh
run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

# Following shall be disabled since not supported from GitHub
#
#- name: Executing KNetTest on Windows with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
Expand All @@ -335,4 +377,140 @@ jobs:
# if: ${{ matrix.os == 'windows-latest' && matrix.framework == 'net462' }}
# run: .\bin\${{ matrix.framework }}\KNetTest.exe localhost:9092 randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }}
# env:
# JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}
# JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

execute_KNetTest_other:
needs: [build_windows]
strategy:
fail-fast: false
matrix:
os: [ 'macos-latest', 'macos-13' , 'windows-latest' ]
framework: [ 'net462', 'net6.0', 'net8.0' ]
buffered: [ 'runBuffered', '']
extraValue: [ '', 'withBigBigExtraValue' ]
jdk_vendor: [ 'temurin', 'zulu', 'oracle'] #removed 'microsoft', 'corretto', to reduce matrix size
jdk_version: [ '11', '17', '21' ] # only LTS versions
exclude:
- os: macos-latest
framework: net462
- os: macos-latest
framework: net6.0
- os: macos-13
framework: net462
- os: macos-13
framework: net6.0
- jdk_vendor: oracle
jdk_version: 11

runs-on: ${{ matrix.os }}
steps:
- name: Restore KNet ${{ matrix.framework }} bin from cache
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
enableCrossOsArchive: true
path: ./bin/${{ matrix.framework }}/
key: KNet_${{ matrix.framework }}_bin_${{ github.sha }}

- name: Restore KNetCLI ${{ matrix.framework }} binCLI from cache
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
enableCrossOsArchive: true
path: ./binCLI/${{ matrix.framework }}/
key: KNet_${{ matrix.framework }}_binCLI_${{ github.sha }}

- name: Set up JDK distribution
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: ${{ matrix.jdk_vendor }}
java-version: ${{ matrix.jdk_version }}

- name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os != 'windows-latest' }}
shell: pwsh
run: |
New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory
Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_zookeeper_out.log -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'zookeeperstart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/zookeeper.properties' )
Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}/logfiles/PWSH_kafka_out.log -FilePath dotnet -ArgumentList ( '${{ github.workspace }}/binCLI/${{ matrix.framework }}/MASES.KNetCLI.dll', 'kafkastart', '-LogPath', '${{ github.workspace }}/logfiles/', '-Log4JConfiguration', '${{ github.workspace }}/bin/${{ matrix.framework }}/log4j.properties', '${{ github.workspace }}/bin/${{ matrix.framework }}/server.properties' )
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

# - name: Start Kafka on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
# if: ${{ matrix.os == 'windows-latest' }}
# shell: cmd
# run: |
# mkdir ${{ github.workspace }}\logfiles
# START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe zookeeperstart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties
# START /B ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe kafkastart -LogPath ${{ github.workspace }}\logfiles\ -Log4JConfiguration ${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties ${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties
# # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' )
# # Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' )
# env:
# JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os != 'windows-latest' }}
shell: pwsh
run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.dll localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }}
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- name: Executing KNetTest on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
Add-Content -Path ${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties -Value 'log.cleaner.enable=false'
New-Item -Path "${{ github.workspace }}" -Name "logfiles" -ItemType Directory
Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_zookeeper_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_zookeeper_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'zookeeperstart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\zookeeper.properties' )
Start-Process -RSE ${{ github.workspace }}/logfiles/PWSH_kafka_err.log -RSO ${{ github.workspace }}\logfiles\PWSH_kafka_out.log -FilePath ${{ github.workspace }}\binCLI\${{ matrix.framework }}\MASES.KNetCLI.exe -ArgumentList ( 'kafkastart', '-LogPath', '${{ github.workspace }}\logfiles\', '-Log4JConfiguration', '${{ github.workspace }}\bin\${{ matrix.framework }}\log4j.properties', '${{ github.workspace }}\bin\${{ matrix.framework }}\server.properties' )
${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTest.exe localhost:9092 useConsumeCallback randomizeTopicName ${{ matrix.buffered }} ${{ matrix.extraValue }}
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os != 'windows-latest' }}
shell: pwsh
run: dotnet ${{ github.workspace }}/bin/${{ matrix.framework }}/KNetTestSerDes.dll
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- name: Executing KNetTestSerDes on ${{ matrix.os }} with ${{ matrix.jdk_vendor }} ${{ matrix.jdk_version }}
if: ${{ matrix.os == 'windows-latest' }} # && matrix.framework != 'net462' }} # disable in net462 due to error we don't see in local tests and it is quite impossible to verify it on GitHub
shell: pwsh
run: ${{ github.workspace }}\bin\${{ matrix.framework }}\KNetTestSerDes.exe
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- uses: actions/upload-artifact@v4
if: failure()
with:
name: KNet_Server_${{ matrix.os }}_${{ matrix.framework }}_${{ matrix.jdk_vendor }}_${{ matrix.jdk_version }}_${{ matrix.buffered }}_${{ matrix.extraValue }}
path: ${{ github.workspace }}/logfiles/
retention-days: 7

final_cleanup:
needs: [ execute_KNetTest_linux, execute_KNetTest_other ]
if: "always()"
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
fetch-depth: '1'

- name: Clear caches
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list --key KNet )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Common\Common.props" />
<Import Project="..\..\Common\Common.props" />
<PropertyGroup>
<AssemblyName>KNetBenchmark</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Common\Common.props" />
<Import Project="..\..\Common\Common.props" />
<PropertyGroup>
<AssemblyName>KNetRoundTripBenchmark</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Common\Common.props" />
<Import Project="..\..\Common\Common.props" />
<PropertyGroup>
<AssemblyName>KNetTopicCopyBenchmark</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
14 changes: 7 additions & 7 deletions tests/net/Common/Common.props
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\src\net\Common\Common.props" />
<Import Project="$(SolutionDir)\..\..\src\net\Common\Common.props" />
<PropertyGroup>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AssemblyOriginatorKeyFile>..\..\..\src\net\Common\KNet.snk</AssemblyOriginatorKeyFile>
<OutputPath>..\..\..\bin\</OutputPath>
<AssemblyOriginatorKeyFile>$(SolutionDir)\..\..\src\net\Common\KNet.snk</AssemblyOriginatorKeyFile>
<OutputPath>$(SolutionDir)\..\..\bin\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\..\LICENSE" Pack="true" PackagePath="" />
<None Include="..\..\..\src\net\Common\JCOB128x128.png" Pack="true" PackagePath="" />
<None Include="..\..\..\src\net\Common\KNet.snk" Link="KNet.snk" />
<None Include="$(SolutionDir)\..\..\LICENSE" Pack="true" PackagePath="" />
<None Include="$(SolutionDir)\..\..\src\net\Common\JCOB128x128.png" Pack="true" PackagePath="" />
<None Include="$(SolutionDir)\..\..\src\net\Common\KNet.snk" Link="KNet.snk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\net\KNet\KNet.csproj" />
<ProjectReference Include="$(SolutionDir)\..\..\src\net\KNet\KNet.csproj" />
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions tests/net/Common/SharedKNetCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ public static void Create()
{
ApplicationJarRootPath = Const.DefaultJarsPath;
CreateGlobalInstance();
if (GlobalInstance == null)
{
throw new InvalidOperationException("Failed to create GlobalInstance");
}
if (JCOBridge.C2JBridge.JCOBridge.Global == null)
{
throw new InvalidOperationException("JCOBridge.C2JBridge.JCOBridge.Global is null!!!");
}
}

public static int ManageException(System.Exception e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Common\Common.props" />
<Import Project="..\..\Common\Common.props" />
<PropertyGroup>
<OutputPath>..\..\binConnect\</OutputPath>
<OutputPath>..\..\..\..\binConnect\</OutputPath>
<AssemblyName>KNetConnectTest</AssemblyName>
<RootNamespace>MASES.KNetConnectTest</RootNamespace>
<Title>KNetConnectTest - a test tool for KNet Connect</Title>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Common\Common.props" />
<Import Project="..\..\Common\Common.props" />
<PropertyGroup>
<AssemblyName>KNetClassicTest</AssemblyName>
<OutputType>Exe</OutputType>
Expand All @@ -8,6 +8,6 @@
<Description>KNetClassicTest - a test tool for KNet Classic</Description>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Common\SharedKNetCore.cs" Link="SharedKNetCore.cs" />
<Compile Include="..\..\Common\SharedKNetCore.cs" Link="SharedKNetCore.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Common\Common.props" />
<Import Project="..\..\Common\Common.props" />
<PropertyGroup>
<AssemblyName>KNetCompactedReplicatorTest</AssemblyName>
<OutputType>Exe</OutputType>
Expand All @@ -8,9 +8,9 @@
<Description>KNetCompactedReplicatorTest - a test tool for KNet</Description>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Common\SharedKNetCore.cs" Link="SharedKNetCore.cs" />
<Compile Include="..\..\Common\SharedKNetCore.cs" Link="SharedKNetCore.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\net\KNet.Serialization.Json\KNet.Serialization.Json.csproj" />
<ProjectReference Include="..\..\..\..\src\net\KNet.Serialization.Json\KNet.Serialization.Json.csproj" />
</ItemGroup>
</Project>
Loading