incubator-chukwa-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuti Awasthi <Stuti_Awas...@persistent.co.in>
Subject Why system.exit() present in Demux.java
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 AbstractProcessor.java.

*         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 = ToolRunner.run(new Configuration(), new Demux(), args);
    System.exit(res);
                 }

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.

Questions

*         I want to know why we have this System.exit() in Demux.java 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

Thanks
Stuti Awasthi

DISCLAIMER
==========
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.

Mime
View raw message