Tencent / TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong

Home Page:https://inlong.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Useless `main` method in subclass of Action

aloyszhang opened this issue · comments

I found some main method just sleep 100000000ms in a new thread in some subClass of Action,

public static void main(String[] args) {
        new Thread() {
            @Override
            public void run() {
                try {
                    Thread.sleep(100000000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }.start();
    }

It seems useless. and I think wo can remove these code. What do think about it ?
@gosonzhang

commented

Make sense to me. Also I'm curious the history why we introduce such code snippets.

This should be used for unit testing a long time ago, not removed.

Can you fix it?

@gosonzhang ok, I'll contribute a PR.

thanks