Skip to content

Commit 7ac99a4

Browse files
Updating Java smoke tests (#2219)
* Updating Java smoke test to use durable java client * Updating tests
1 parent 752de50 commit 7ac99a4

37 files changed

+123
-40
lines changed

.github/workflows/smoketest-java8-v4.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v2
20+
- name: Set up JDK 8
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: '8'
24+
distribution: 'temurin'
25+
- name: Build azure functions sample
26+
uses: gradle/gradle-build-action@bc3340afc5e3cc44f2321809ac090d731c13c514
27+
with:
28+
gradle-version: 6.5
29+
arguments: azureFunctionsPackage -p test/SmokeTests/OOProcSmokeTests/durableJava/
30+
continue-on-error: true
31+
- name: Download azure functions java library # TODO: Remove this step once gradle plugin is updated
32+
run: |
33+
wget -P test/SmokeTests/OOProcSmokeTests/durableJava/build/azure-functions/durableJava/lib/ "https://repo.maven.apache.org/maven2/com/microsoft/azure/functions/azure-functions-java-library/2.0.1/azure-functions-java-library-2.0.1.jar" --show-progress
2034
- name: Run V4 Java 8 Smoke Test
2135
run: test/SmokeTests/e2e-test.ps1 -DockerfilePath test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile -HttpStartPath api/StartOrchestration
2236
shell: pwsh

test/SmokeTests/OOProcSmokeTests/durableJava/Capitalize/function.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/SmokeTests/OOProcSmokeTests/durableJava/Cities/function.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/SmokeTests/OOProcSmokeTests/durableJava/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ RUN cd /root/test/SmokeTests/OOProcSmokeTests/durableJava && \
44
dotnet build -o bin
55

66
FROM mcr.microsoft.com/azure-functions/java:4-java8
7+
# Copy the bin folder generated at /root/test/SmokeTests/OOProcSmokeTests/durableJava
78
COPY --from=build-env /root/test/SmokeTests/OOProcSmokeTests/durableJava /home/site/wwwroot
89

9-
RUN rm /azure-functions-host/workers/java/azure-functions-java-worker.jar
10-
COPY test/SmokeTests/OOProcSmokeTests/durableJava/azure-functions-java-worker-2.2.3.jar /azure-functions-host/workers/java/azure-functions-java-worker.jar
11-
COPY test/SmokeTests/OOProcSmokeTests/durableJava/ /home/site/wwwroot/
10+
# Copy the Java azure function package
11+
COPY test/SmokeTests/OOProcSmokeTests/durableJava/build/azure-functions/durableJava/ /home/site/wwwroot/
1212
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
1313
AzureFunctionsJobHost__Logging__Console__IsEnabled=true

test/SmokeTests/OOProcSmokeTests/durableJava/StartOrchestration/function.json

Lines changed: 0 additions & 19 deletions
This file was deleted.
Binary file not shown.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
plugins {
2+
id "com.microsoft.azure.azurefunctions" version "1.9.0"
3+
}
4+
apply plugin: 'java'
5+
apply plugin: "com.microsoft.azure.azurefunctions"
6+
7+
group 'com.functions'
8+
version '0.1.0-SNAPSHOT'
9+
10+
repositories {
11+
mavenLocal()
12+
maven {
13+
url "https://oss.sonatype.org/content/repositories/snapshots/"
14+
}
15+
mavenCentral()
16+
}
17+
18+
dependencies {
19+
implementation 'com.microsoft:durabletask-azure-functions:1.0.0-beta.1'
20+
21+
implementation 'com.microsoft.azure.functions:azure-functions-java-library:2.0.1'
22+
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
23+
testImplementation 'org.mockito:mockito-core:3.3.3'
24+
runtimeOnly "io.grpc:grpc-netty-shaded:1.38.0"
25+
}
26+
27+
sourceCompatibility = '1.8'
28+
targetCompatibility = '1.8'
29+
30+
compileJava.options.encoding = 'UTF-8'
31+
32+
azurefunctions {
33+
resourceGroup = 'java-functions-group'
34+
appName = 'durableJava'
35+
pricingTier = 'Consumption'
36+
region = 'westus'
37+
runtime {
38+
os = 'Windows'
39+
javaVersion = 'Java 8'
40+
}
41+
auth {
42+
type = 'azure_cli'
43+
}
44+
localDebug = "transport=dt_socket,server=y,suspend=n,address=5005"
45+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)