File tree Expand file tree Collapse file tree 1 file changed +20
-11
lines changed
samples-azure-functions/src/test/java/com/functions Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change 1515@ Tag ("e2e" )
1616public class EndToEndTests {
1717
18+ private String waitForCompletion (String statusQueryGetUri ) throws InterruptedException {
19+ String runTimeStatus = null ;
20+ for (int i = 0 ; i < 15 ; i ++) {
21+ Response statusResponse = get (statusQueryGetUri );
22+ runTimeStatus = statusResponse .jsonPath ().get ("runtimeStatus" );
23+ if (!"Completed" .equals (runTimeStatus )) {
24+ Thread .sleep (1000 );
25+ } else break ;
26+ }
27+ return runTimeStatus ;
28+ }
29+
1830 @ Order (1 )
1931 @ Test
2032 public void setupHost () {
@@ -82,16 +94,13 @@ public void restart(boolean restartWithNewInstanceId) throws InterruptedExceptio
8294 }
8395 }
8496
85- private String waitForCompletion (String statusQueryGetUri ) throws InterruptedException {
86- String runTimeStatus = null ;
87- for (int i = 0 ; i < 15 ; i ++) {
88- Response statusResponse = get (statusQueryGetUri );
89- runTimeStatus = statusResponse .jsonPath ().get ("runtimeStatus" );
90- if (!"Completed" .equals (runTimeStatus )) {
91- Thread .sleep (1000 );
92- } else break ;
93- }
94- return runTimeStatus ;
97+ @ Test
98+ public void customizeDataConverter () throws InterruptedException {
99+ String startOrchestrationPath = "/api/StartCustomize" ;
100+ Response response = post (startOrchestrationPath );
101+ JsonPath jsonPath = response .jsonPath ();
102+ String statusQueryGetUri = jsonPath .get ("statusQueryGetUri" );
103+ String runTimeStatus = waitForCompletion (statusQueryGetUri );
104+ assertEquals ("Completed" , runTimeStatus );
95105 }
96-
97106}
You can’t perform that action at this time.
0 commit comments