File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
framework/src/test/java/org/tron/core Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -857,6 +857,20 @@ public void testGetDelegatedResourceV2() {
857857 }
858858 }
859859
860+ @ Test
861+ public void testGetPaginatedNowWitnessList_Error () {
862+ try {
863+ // To avoid throw MaintenanceClearingException
864+ dbManager .getChainBaseManager ().getDynamicPropertiesStore ().saveStateFlag (1 );
865+ wallet .getPaginatedNowWitnessList (0 , 10 );
866+ Assert .fail ("Should throw error when in maintenance period" );
867+ } catch (Exception e ) {
868+ Assert .assertTrue ("Should throw MaintenanceClearingException" ,
869+ e instanceof MaintenanceClearingException );
870+ }
871+ dbManager .getChainBaseManager ().getDynamicPropertiesStore ().saveStateFlag (0 );
872+ }
873+
860874 @ Test
861875 public void testGetPaginatedNowWitnessList_CornerCase () {
862876 try {
You can’t perform that action at this time.
0 commit comments