File tree 3 files changed +29
-2
lines changed
modules/flowable-app-engine-rest/src/test/java/org/flowable/app/rest/service/api/repository
3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 74
74
uses : actions/upload-artifact@v4
75
75
if : ${{ failure() && steps.test.conclusion == 'failure' }}
76
76
with :
77
- name : surefire-test-reports
77
+ name : surefire-test-reports-${{ matrix.oracle }}
78
78
path : ' **/target/surefire-reports/*'
Original file line number Diff line number Diff line change 71
71
uses : actions/upload-artifact@v4
72
72
if : ${{ failure() && steps.test.conclusion == 'failure' }}
73
73
with :
74
- name : surefire-test-reports
74
+ name : surefire-test-reports-${{ matrix.mssql }}
75
75
path : ' **/target/surefire-reports/*'
Original file line number Diff line number Diff line change @@ -87,6 +87,33 @@ public void testGetDeployments() throws Exception {
87
87
// Check without tenantId filtering
88
88
url = baseUrl + "?withoutTenantId=true" ;
89
89
assertResultsPresentInDataResponse (url , firstDeployment .getId ());
90
+ } finally {
91
+ // Always cleanup any created deployments, even if the test failed
92
+ List <AppDeployment > deployments = repositoryService .createDeploymentQuery ().list ();
93
+ for (AppDeployment deployment : deployments ) {
94
+ repositoryService .deleteDeployment (deployment .getId (), true );
95
+ }
96
+ }
97
+ }
98
+
99
+ public void testGetDeploymentsSorting () throws Exception {
100
+
101
+ try {
102
+ // Alter time to ensure different deployTimes
103
+ Calendar yesterday = Calendar .getInstance ();
104
+ yesterday .add (Calendar .DAY_OF_MONTH , -1 );
105
+ appEngineConfiguration .getClock ().setCurrentTime (yesterday .getTime ());
106
+
107
+ AppDeployment firstDeployment = repositoryService .createDeployment ().name ("Deployment 1" ).category ("DEF" )
108
+ .addClasspathResource ("org/flowable/app/rest/service/api/repository/oneApp.app" )
109
+ .tenantId ("acme" )
110
+ .deploy ();
111
+
112
+ appEngineConfiguration .getClock ().setCurrentTime (Calendar .getInstance ().getTime ());
113
+ AppDeployment secondDeployment = repositoryService .createDeployment ().name ("Deployment 2" ).category ("ABC" )
114
+ .addClasspathResource ("org/flowable/app/rest/service/api/repository/oneApp.app" )
115
+ .tenantId ("myTenant" )
116
+ .deploy ();
90
117
91
118
// Check ordering by name
92
119
CloseableHttpResponse response = executeRequest (
You can’t perform that action at this time.
0 commit comments