File tree Expand file tree Collapse file tree
store/src/test/java/org/apache/rocketmq/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,41 +107,4 @@ public void testGetCurrentState() {
107107 // Verify the current state
108108 assertEquals (MessageStoreState .INIT , stateMachine .getCurrentState ());
109109 }
110-
111- /**
112- * Test getTotalRunningTimeMs method.
113- */
114- @ Test
115- public void testGetTotalRunningTimeMs () {
116- // Sleep for a short duration to simulate elapsed time
117- try {
118- Thread .sleep (100 );
119- } catch (InterruptedException e ) {
120- Thread .currentThread ().interrupt ();
121- }
122-
123- // Verify the total running time is approximately correct
124- long totalTime = stateMachine .getTotalRunningTimeMs ();
125- assertTrue (totalTime >= 100 && totalTime < 200 );
126- }
127-
128- /**
129- * Test getCurrentStateRunningTimeMs method.
130- */
131- @ Test
132- public void testGetCurrentStateRunningTimeMs () {
133- // Perform a state transition
134- stateMachine .transitTo (MessageStoreState .LOAD_COMMITLOG_OK );
135-
136- // Sleep for a short duration to simulate elapsed time
137- try {
138- Thread .sleep (100 );
139- } catch (InterruptedException e ) {
140- Thread .currentThread ().interrupt ();
141- }
142-
143- // Verify the current state running time is approximately correct
144- long currentStateTime = stateMachine .getCurrentStateRunningTimeMs ();
145- assertTrue (currentStateTime >= 100 && currentStateTime < 200 );
146- }
147110}
You can’t perform that action at this time.
0 commit comments