Skip to content

Commit 0e5b705

Browse files
committed
addressed PR feedback
1 parent 68303eb commit 0e5b705

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

azurefunctions/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ dependencies {
2222
implementation group: 'com.microsoft.azure.functions', name: 'azure-functions-java-library', version: '3.2.3'
2323
implementation "com.google.protobuf:protobuf-java:${protocVersion}"
2424
compileOnly "com.microsoft.azure.functions:azure-functions-java-spi:1.1.0"
25+
testImplementation platform('org.junit:junit-bom:5.14.2')
26+
testImplementation 'org.junit.jupiter:junit-jupiter'
27+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
28+
}
29+
30+
test {
31+
useJUnitPlatform()
2532
}
2633

2734
sourceCompatibility = JavaVersion.VERSION_1_8

azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/HttpManagementPayload.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public String getPurgeHistoryDeleteUri() {
9393
* @return The HTTP URL for posting instance restart commands.
9494
*/
9595
public String getRestartPostUri() {
96-
return restartPostUri;
96+
return this.restartPostUri;
9797
}
9898

9999
/**
@@ -120,7 +120,7 @@ public String getResumePostUri() {
120120
* @return The HTTP URL for posting instance rewind commands.
121121
*/
122122
public String getRewindPostUri() {
123-
return rewindPostUri;
123+
return this.rewindPostUri;
124124
}
125125

126126
}

endtoendtests/src/test/java/com/functions/HttpManagementPayloadTest.java renamed to azurefunctions/src/test/java/com/microsoft/durabletask/azurefunctions/HttpManagementPayloadTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
package com.functions;
1+
package com.microsoft.durabletask.azurefunctions;
22

3-
import com.microsoft.durabletask.azurefunctions.HttpManagementPayload;
43
import org.junit.jupiter.api.DisplayName;
54
import org.junit.jupiter.api.Test;
65

@@ -74,4 +73,11 @@ public void getResumePostUri_ReturnsCorrectUrl() {
7473
HttpManagementPayload payload = createPayload();
7574
assertEquals(INSTANCE_STATUS_URL + "/resume?reason={text}&" + QUERY_STRING, payload.getResumePostUri());
7675
}
76+
77+
@Test
78+
@DisplayName("getRewindPostUri should return correct URL")
79+
public void getRewindPostUri_ReturnsCorrectUrl() {
80+
HttpManagementPayload payload = createPayload();
81+
assertEquals(INSTANCE_STATUS_URL + "/rewind?reason={text}&" + QUERY_STRING, payload.getRewindPostUri());
82+
}
7783
}

endtoendtests/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ targetCompatibility = '1.8'
3232

3333
compileJava.options.encoding = 'UTF-8'
3434

35-
test {
36-
useJUnitPlatform {
37-
excludeTags 'e2e'
38-
}
39-
}
40-
4135
task endToEndTest(type: Test) {
4236
useJUnitPlatform {
4337
includeTags 'e2e'

0 commit comments

Comments
 (0)