File tree Expand file tree Collapse file tree 4 files changed +16
-11
lines changed
main/java/com/alipay/sofa/ark/container/model
test/java/com/alipay/sofa/ark/container/model
core/spi/src/main/java/com/alipay/sofa/ark/spi/model Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 14
14
</modules >
15
15
16
16
<properties >
17
- <sofa .ark.version>2.2.15 </sofa .ark.version>
18
- <sofa .ark.version.old>2.2.14 </sofa .ark.version.old>
17
+ <sofa .ark.version>2.2.16-SNAPSHOT </sofa .ark.version>
18
+ <sofa .ark.version.old>2.2.15 </sofa .ark.version.old>
19
19
<project .encoding>UTF-8</project .encoding>
20
20
<java .version>1.8</java .version>
21
21
<license .maven.plugin>3.0</license .maven.plugin>
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ public void stop() {
421
421
BizManagerService bizManagerService = ArkServiceContainerHolder .getContainer ()
422
422
.getService (BizManagerService .class );
423
423
bizManagerService .unRegisterBiz (bizName , bizVersion );
424
- setBizState (BizState .UNRESOLVED , StateChangeReason .STOPPED );
424
+ setBizState (BizState .STOPPED , StateChangeReason .STOPPED );
425
425
eventAdminService .sendEvent (new BeforeBizRecycleEvent (this ));
426
426
urls = null ;
427
427
denyImportPackages = null ;
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ public void testStopFailedWithClean() {
145
145
bizModel .stop ();
146
146
} catch (RuntimeException e ) {
147
147
}
148
- assertEquals (BizState .UNRESOLVED , bizModel .getBizState ());
148
+ assertEquals (BizState .STOPPED , bizModel .getBizState ());
149
149
}
150
150
151
151
bizModel .setBizState (BizState .ACTIVATED );
@@ -186,7 +186,7 @@ public void testStopSucceedWithClean() {
186
186
mockedStatic .when (ArkServiceContainerHolder ::getContainer ).thenReturn (arkServiceContainer );
187
187
bizModel .stop ();
188
188
189
- assertEquals (BizState .UNRESOLVED , bizModel .getBizState ());
189
+ assertEquals (BizState .STOPPED , bizModel .getBizState ());
190
190
}
191
191
192
192
bizModel .setBizState (BizState .ACTIVATED );
@@ -201,7 +201,7 @@ public void testStopSucceedWithClean() {
201
201
mockedStatic .when (ArkServiceContainerHolder ::getContainer ).thenReturn (arkServiceContainer );
202
202
bizModel .stop ();
203
203
204
- assertEquals (BizState .UNRESOLVED , bizModel .getBizState ());
204
+ assertEquals (BizState .STOPPED , bizModel .getBizState ());
205
205
} finally {
206
206
ArkConfigs .putStringValue (AUTO_UNINSTALL_WHEN_FAILED_ENABLE , "true" );
207
207
}
Original file line number Diff line number Diff line change 24
24
*/
25
25
public enum BizState {
26
26
/**
27
- * init but not start install yet
28
- * or
29
- * uninstalled
27
+ * not init or not start install yet
30
28
*/
31
29
UNRESOLVED ("unresolved" ),
32
30
/**
@@ -45,9 +43,14 @@ public enum BizState {
45
43
DEACTIVATED ("deactivated" ),
46
44
47
45
/**
48
- * install failed.
46
+ * install or uninstall failed.
49
47
*/
50
- BROKEN ("broken" );
48
+ BROKEN ("broken" ),
49
+
50
+ /**
51
+ * uninstall succeed
52
+ */
53
+ STOPPED ("stopped" );
51
54
52
55
private String state ;
53
56
@@ -73,6 +76,8 @@ public static BizState of(String state) {
73
76
return ACTIVATED ;
74
77
} else if (DEACTIVATED .name ().equalsIgnoreCase (state )) {
75
78
return DEACTIVATED ;
79
+ } else if (STOPPED .name ().equalsIgnoreCase (state )) {
80
+ return STOPPED ;
76
81
} else {
77
82
return BROKEN ;
78
83
}
You can’t perform that action at this time.
0 commit comments