Copilot commented on code in PR #2475:
URL: 
https://github.com/apache/shardingsphere-elasticjob/pull/2475#discussion_r2338618725


##########
test/native/src/test/java/org/apache/shardingsphere/elasticjob/test/natived/it/operation/JavaTest.java:
##########
@@ -305,4 +308,45 @@ void testShardingStatisticsAPI() {
         });
         job.shutdown();
     }
+    
+    @Test
+    void testWhenShutdownThenTaskCanCaptureInterruptedException() throws 
Exception {
+        testCaptureInterruptedException(1);
+        testCaptureInterruptedException(2);
+    }
+    
+    private void testCaptureInterruptedException(final int shardingTotalCount) 
throws Exception {
+        String jobName = "testTaskCaptureInterruptedTask" + shardingTotalCount;
+        AtomicBoolean captured = new AtomicBoolean(false);
+        AtomicBoolean running = new AtomicBoolean(false);
+        LocalTime oneSecondsLater = LocalTime.now().plusSeconds(1);
+        String cronExpression = String.format("%d %d %d * * ?", 
oneSecondsLater.getSecond(), oneSecondsLater.getMinute(), 
oneSecondsLater.getHour());

Review Comment:
   [nitpick] The variable name 'oneSecondsLater' is grammatically incorrect. It 
should be either 'oneSecondLater' (singular) or 'secondsLater'.
   ```suggestion
           LocalTime oneSecondLater = LocalTime.now().plusSeconds(1);
           String cronExpression = String.format("%d %d %d * * ?", 
oneSecondLater.getSecond(), oneSecondLater.getMinute(), 
oneSecondLater.getHour());
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to