diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml
index d9a4e1b58a..dad5a3b6f1 100644
--- a/.azure/pipelines/jobs/default-build.yml
+++ b/.azure/pipelines/jobs/default-build.yml
@@ -233,7 +233,7 @@ jobs:
condition: always()
inputs:
testRunner: junit
- testResultsFiles: '**/TEST-com.microsoft.signalr*.xml'
+ testResultsFiles: '**/TEST-junit-jupiter.xml'
buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName)
mergeTestResults: true
diff --git a/.gitattributes b/.gitattributes
index ff67a9158f..3225eae5e0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,6 +8,11 @@
###############################################################################
*.sh eol=lf
+###############################################################################
+# Make gradlew always have LF as line endings
+###############################################################################
+gradlew eol=lf
+
###############################################################################
# Set default behavior for command prompt diff.
#
diff --git a/Directory.Build.props b/Directory.Build.props
index b68fd8cb66..a4b4790b40 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -187,5 +187,6 @@
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 01c320019a..c961c8db3e 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -163,5 +163,6 @@
+
diff --git a/eng/helix/content/InstallJdk.ps1 b/eng/helix/content/InstallJdk.ps1
new file mode 100644
index 0000000000..a9346062fa
--- /dev/null
+++ b/eng/helix/content/InstallJdk.ps1
@@ -0,0 +1,62 @@
+<#
+.SYNOPSIS
+ Installs JDK into a folder in this repo.
+.DESCRIPTION
+ This script downloads an extracts the JDK.
+.PARAMETER JdkVersion
+ The version of the JDK to install. If not set, the default value is read from global.json
+.PARAMETER Force
+ Overwrite the existing installation
+#>
+param(
+ [string]$JdkVersion,
+ [Parameter(Mandatory = $false)]
+ $InstallDir
+)
+$ErrorActionPreference = 'Stop'
+$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
+
+Set-StrictMode -Version 1
+
+if ($InstallDir) {
+ $installDir = $InstallDir;
+}
+else {
+ $repoRoot = Resolve-Path "$PSScriptRoot\..\.."
+ $installDir = "$repoRoot\.tools\jdk\win-x64\"
+}
+$tempDir = "$installDir\obj"
+if (-not $JdkVersion) {
+ $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
+ $JdkVersion = $globalJson.tools.jdk
+}
+
+if (Test-Path $installDir) {
+ if ($Force) {
+ Remove-Item -Force -Recurse $installDir
+ }
+ else {
+ Write-Host "The JDK already installed to $installDir. Exiting without action. Call this script again with -Force to overwrite."
+ exit 0
+ }
+}
+
+Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null
+mkdir $tempDir -ea Ignore | out-null
+mkdir $installDir -ea Ignore | out-null
+Write-Host "Starting download of JDK ${JdkVersion}"
+Invoke-WebRequest -UseBasicParsing -Uri "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/java/jdk-${JdkVersion}_windows-x64_bin.zip" -OutFile "$tempDir/jdk.zip"
+Write-Host "Done downloading JDK ${JdkVersion}"
+
+Add-Type -assembly "System.IO.Compression.FileSystem"
+[System.IO.Compression.ZipFile]::ExtractToDirectory("$tempDir/jdk.zip", "$tempDir/jdk/")
+
+Write-Host "Expanded JDK to $tempDir"
+Write-Host "Installing JDK to $installDir"
+Move-Item "$tempDir/jdk/jdk-${JdkVersion}/*" $installDir
+Write-Host "Done installing JDK to $installDir"
+Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null
+
+if ($env:TF_BUILD) {
+ Write-Host "##vso[task.prependpath]$installDir\bin"
+}
diff --git a/eng/helix/content/installjdk.sh b/eng/helix/content/installjdk.sh
new file mode 100644
index 0000000000..6c1c2ff5c6
--- /dev/null
+++ b/eng/helix/content/installjdk.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+# Cause the script to fail if any subcommand fails
+set -e
+
+pushd .
+
+if [ "$JAVA_HOME" != "" ]; then
+ echo "JAVA_HOME is set"
+ exit
+fi
+
+java_version=$1
+arch=$2
+osname=`uname -s`
+if [ "$osname" = "Darwin" ]; then
+ echo "macOS not supported, relying on the machine providing java itself"
+ exit 1
+else
+ platformarch="linux-$arch"
+fi
+echo "PlatformArch: $platformarch"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+output_dir="$DIR/java"
+url="https://netcorenativeassets.blob.core.windows.net/resource-packages/external/linux/java/jdk-${java_version}_${platformarch}_bin.tar.gz"
+echo "Downloading from: $url"
+tmp="$(mktemp -d -t install-jdk.XXXXXX)"
+
+cleanup() {
+ exitcode=$?
+ if [ $exitcode -ne 0 ]; then
+ echo "Failed to install java with exit code: $exitcode"
+ fi
+ rm -rf "$tmp"
+ exit $exitcode
+}
+
+trap "cleanup" EXIT
+cd "$tmp"
+curl -Lsfo $(basename $url) "$url"
+echo "Installing java from $(basename $url) $url"
+mkdir $output_dir
+echo "Unpacking to $output_dir"
+tar --strip-components 1 -xzf "jdk-${java_version}_${platformarch}_bin.tar.gz" --no-same-owner --directory "$output_dir"
+
+popd
\ No newline at end of file
diff --git a/eng/helix/content/installnode.sh b/eng/helix/content/installnode.sh
index 0442958ac2..db5d2fa5a5 100644
--- a/eng/helix/content/installnode.sh
+++ b/eng/helix/content/installnode.sh
@@ -22,7 +22,17 @@ output_dir="$DIR/node"
url="http://nodejs.org/dist/v$node_version/node-v$node_version-$platformarch.tar.gz"
echo "Downloading from: $url"
tmp="$(mktemp -d -t install-node.XXXXXX)"
-trap "rm -rf $tmp" EXIT
+
+cleanup() {
+ exitcode=$?
+ if [ $exitcode -ne 0 ]; then
+ echo "Failed to install node with exit code: $exitcode"
+ fi
+ rm -rf "$tmp"
+ exit $exitcode
+}
+
+trap "cleanup" EXIT
cd "$tmp"
curl -Lsfo $(basename $url) "$url"
echo "Installing node from $(basename $url) $url"
diff --git a/eng/targets/CSharp.Common.props b/eng/targets/CSharp.Common.props
index 6cc6bd2dd8..4600fad635 100644
--- a/eng/targets/CSharp.Common.props
+++ b/eng/targets/CSharp.Common.props
@@ -35,6 +35,5 @@
-
diff --git a/eng/targets/CSharp.Common.targets b/eng/targets/CSharp.Common.targets
index 877665a63b..e327a7b886 100644
--- a/eng/targets/CSharp.Common.targets
+++ b/eng/targets/CSharp.Common.targets
@@ -30,5 +30,5 @@
-
+
diff --git a/eng/targets/Helix.props b/eng/targets/Helix.props
index 40e9420500..d36c4a1a7a 100644
--- a/eng/targets/Helix.props
+++ b/eng/targets/Helix.props
@@ -15,6 +15,8 @@
false
false
true
+ false
+ true
$(MSBuildProjectName)--$(TargetFramework)
false
false
@@ -33,16 +35,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets
index f3d1ad0f16..eecd36f02a 100644
--- a/eng/targets/Helix.targets
+++ b/eng/targets/Helix.targets
@@ -1,10 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -91,6 +108,7 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
@(HelixPostCommand)
call runtests.cmd $(TargetFileName) $(TargetFrameworkIdentifier) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests)
./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests)
+ $(HelixCommand)
$(HelixTimeout)
diff --git a/eng/targets/Npm.Common.targets b/eng/targets/Npm.Common.targets
index fd15a8e45e..3460edde2e 100644
--- a/eng/targets/Npm.Common.targets
+++ b/eng/targets/Npm.Common.targets
@@ -119,7 +119,7 @@
-
+
diff --git a/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/CommonLibTests.vcxproj b/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/CommonLibTests.vcxproj
index d8d0ef653b..a49803ecce 100644
--- a/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/CommonLibTests.vcxproj
+++ b/src/Servers/IIS/AspNetCoreModuleV2/CommonLibTests/CommonLibTests.vcxproj
@@ -1,4 +1,7 @@
+
+ false
+
Debug
diff --git a/src/SignalR/clients/java/signalr/.gitignore b/src/SignalR/clients/java/signalr/.gitignore
index eabba7738e..3e9534ce39 100644
--- a/src/SignalR/clients/java/signalr/.gitignore
+++ b/src/SignalR/clients/java/signalr/.gitignore
@@ -2,6 +2,7 @@
.gradletasknamecache
.gradle/
build/
+/test-results
.settings/
out/
*.class
diff --git a/src/SignalR/clients/java/signalr/build.gradle b/src/SignalR/clients/java/signalr/build.gradle
index 4b18bba589..b845d83949 100644
--- a/src/SignalR/clients/java/signalr/build.gradle
+++ b/src/SignalR/clients/java/signalr/build.gradle
@@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.14.0"
+ classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
}
}
@@ -16,6 +17,7 @@ plugins {
apply plugin: "java-library"
apply plugin: "com.diffplug.gradle.spotless"
+apply plugin: 'org.junit.platform.gradle.plugin'
group 'com.microsoft.signalr'
@@ -64,8 +66,8 @@ spotless {
}
}
-test {
- useJUnitPlatform()
+junitPlatform {
+ reportsDir file('test-results')
}
task sourceJar(type: Jar) {
diff --git a/src/SignalR/clients/java/signalr/signalr.client.java.javaproj b/src/SignalR/clients/java/signalr/signalr.client.java.Tests.javaproj
similarity index 67%
rename from src/SignalR/clients/java/signalr/signalr.client.java.javaproj
rename to src/SignalR/clients/java/signalr/signalr.client.java.Tests.javaproj
index 15eeed479f..d037c1468f 100644
--- a/src/SignalR/clients/java/signalr/signalr.client.java.javaproj
+++ b/src/SignalR/clients/java/signalr/signalr.client.java.Tests.javaproj
@@ -1,5 +1,5 @@
-
-
+
+
@@ -15,6 +15,9 @@
$(GradleOptions) -Dorg.gradle.daemon=false
+ $(OutputPath)
+ true
+
@@ -51,15 +54,37 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
$(GradleOptions) -PpackageVersion="$(PackageVersion)"
+ chmod +x ./gradlew && ./gradlew $(GradleOptions) test
+ call gradlew $(GradleOptions) test
+
+
+
+
+
+
diff --git a/src/SignalR/clients/ts/FunctionalTests/SignalR.Npm.FunctionalTests.npmproj b/src/SignalR/clients/ts/FunctionalTests/SignalR.Npm.FunctionalTests.npmproj
index 6314e22990..8f89229340 100644
--- a/src/SignalR/clients/ts/FunctionalTests/SignalR.Npm.FunctionalTests.npmproj
+++ b/src/SignalR/clients/ts/FunctionalTests/SignalR.Npm.FunctionalTests.npmproj
@@ -9,6 +9,7 @@
<_TestSauceArgs Condition="'$(BrowserTestHostName)' != ''">$(_TestSauceArgs) --use-hostname "$(BrowserTestHostName)"
run test:inner --no-color --configuration $(Configuration)
run build:inner
+ false
@@ -18,7 +19,7 @@
-
+