incubator-chukwa-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuti Awasthi <>
Subject Why system.exit() present in
Date Fri, 03 Dec 2010 08:51:53 GMT
Hi all,
I am facing issues while executing Junit test cases for my custom processor. This is what
I have done :

*         I have created my own processor class extended from

*         For testing I wrote the Junit test class and passed .done file location and output
directory location to Demux.main()

*         Demux class run and successfully executes my custom processor

*         Convert .done to .evt file in output directory as desired.

Issue : Code of Demux.main() class :

                public static void main(String[] args) throws Exception {
    int res = Configuration(), new Demux(), args);

After converting .done file to .evt file , Demux class end the process by System.exit() command
due to which control is not returned to my JUnit test class. Because of this the control is
not reaching my assertion and testcase is not successful.


*         I want to know why we have this System.exit() in class ?

*         Is there any way I can execute my testcase successfully ? Have any one tested processor
classes given by chukwa ? Eg : Syslog, TsProcessor etc

*         Since Demux is a daemon which runs continuously . So does everytime this demux class
is called for every .done file ?

Please Suggest

Stuti Awasthi

This e-mail may contain privileged and confidential information which is the property of Persistent
Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed.
If you are not the intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in error, please notify
the sender and delete all copies of this message. Persistent Systems Ltd. does not accept
any liability for virus infected mails.

View raw message