You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/08/14 05:37:22 UTC

[GitHub] [dolphinscheduler] geosmart commented on pull request #5530: [Bug][worker] task throw ConcurrentModifiedException #5528

geosmart commented on pull request #5530:
URL: https://github.com/apache/dolphinscheduler/pull/5530#issuecomment-898829809


   with the old code
   ```
   logger.info(" -> {}", String.join("\n\t", logs));
   ```
   
   the test case is still pass 
   ```
       @Test
       public void testLogHandler() throws InterruptedException {
           List<String> list = Collections.synchronizedList(new ArrayList<>());
           Thread thread1 = new Thread(() -> {
               for (int i = 0; i < 10; i++) {
                   list.add("test add log");
               }
           });
           Thread thread2 = new Thread(() -> {
               for (int i = 0; i < 10; i++) {
                   sqoopTask.logHandle(list);
               }
           });
           thread1.start();
           thread2.start();
           thread1.join();
           thread2.join();
           // if no exception throw, assert true
           Assert.assertTrue(true);
       }
   ```
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org