Hi, I added patch to jira which add '--port arg (=9090) Port number to listen' to nodejs server at lib/nodejs/test/server.js and '--host arg (=localhost) Host to connect' '--port arg (=9090) Port number to connect' to nodejs client at lib/nodejs/test/client.js. These has been mentioned in http://thrift.apache.org/test/ and was missing from nodejs test server and client. I also noticed that java server is missing '--processor-events' and -n [ --workers ], nodejs server is missing '--processor-events' and -n [ --workers ] and nodejs client is missing -n [ --testloops ]. I'll study about processor events and testloops and try to add them. For thread-pool workers, even though we have argument 'server-type', servers we have in lib and test only creates simple servers. Even we give something else, it will still create a simple server. So reading 'thread pool workers' attribute from inputs seems to make no sense. Also in cross language test suite, we are only using simple servers. So what should I do regarding that. Thank You!
On Tue, May 27, 2014 at 1:38 AM, Chamila Wijayarathna < [email protected]> wrote: > Hi Roger, > I added java-nodejs and nodejs-java tests and attached patch at > https://issues.apache.org/jira/browse/THRIFT-847. Please check if it is > okay. > I came up with few issues and I created following Jiras for them. > https://issues.apache.org/jira/browse/THRIFT-2548 > https://issues.apache.org/jira/browse/THRIFT-2547 > https://issues.apache.org/jira/browse/THRIFT-2546 > Is there anything more to add for nodejs tests? > If this is enough for now, what should be the next step? > > Thank You! > > > > > On Mon, May 26, 2014 at 6:50 PM, Chamila Wijayarathna < > [email protected]> wrote: > >> Hi Roger, >> In the commit you have add 'compact' protocol also. >> But compact protocol gives errors when testing with cpp. >> But it seems like its not a problem of test suite, so we can fix them >> later as you mentioned. >> I'll add nodejs-java tests and ssl tests and attach the patch. >> Thank You! >> >> >> On Mon, May 26, 2014 at 2:31 AM, Roger Meier <[email protected]>wrote: >> >>> Hi Chamila >>> >>> Quoting Chamila Wijayarathna <[email protected]>: >>> >>> Hi Roger, >>>> >>>> Upto now I did following on nodejs tests we discussed earlier. >>>> >>>> - Ran nodejs-nodejs, nodejs-java, java-nodejs tests manually >>>> - Ran nodejs-cpp, cpp-nodejs, nodejs-nodejs tests manually with >>>> compact >>>> >>>> protocol >>>> >>>> I came up with following observations. >>>> >>>> - We can add nodejs-nodejs, nodejs-java, java-nodejs tests to >>>> test.sh in >>>> >>>> the same way we have implemented nodejs-cpp, cpp-nodejs tests. I only >>>> checked them manually, I couldn't ran them through test.sh since I >>>> couldn't >>>> figure out how to make 'node' command work on test.sh. Also nodejs >>>> client >>>> exists after 3 seconds, so I couldn't check if all tests give >>>> success or >>>> failure, is there any way to extend this limit? Node server seems to >>>> fail >>>> with multiException[1] tests in existing cpp tests, so I expect same >>>> output >>>> with other tests which use nodejs server. But I couldn't check it >>>> since I'm >>>> having my node client exists after 3 seconds. >>>> >>> >>> yes, there seems to be an issue with multiException. >>> >>> I've also seen that we still miss nodejs-nodejs tests, I've added them. >>> https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=commitdiff;h= >>> d9b331d2662ff8bbd14f04800ce5de56b21ba01a >>> >>> - Compact protocol seems to work ok with nodejs-nodejs, but when cpp >>>> >>>> involves it gives some errors. So we need to look at what are the >>>> issues >>>> there. >>>> >>>> I would be very grateful if you can provide any help with problems I >>>> have >>>> mentioned above. >>>> Should I create patch with this progress or shall we create patch after >>>> we >>>> solve these problems? >>>> >>> yes, Please provide patches also for combinations that are broken. >>> We need full coverage of combinations and can fix the bugs in a second >>> step. >>> >>> >>> I also tried to run tests with 'ssl', since those options are available >>>> in >>>> node client and server at lib/nodejs/test, but I came up with errors >>>> there. >>>> Do we have 'ssl' for nodejs? >>>> >>> yes, this was added earlier this year. >>> >>> >>> I also looked at existing JavaScript test on cross language test suite, >>>> but >>>> it seems to be very different from others. Can you give me some >>>> information >>>> on how it works? >>>> >>> Javascript test uses the javaserver from lib/js/test/src and phantomjs >>> it's another story. >>> >>> >>> thanks >>> -roger >>> >>> >>> >>>> 1. testMultiException(success, test 3) >>>> >>>> events.js:72 >>>> throw er; // Unhandled 'error' event >>>> ^ >>>> Error: read ECONNRESET >>>> at errnoException (net.js:901:11) >>>> at TCP.onread (net.js:556:19) >>>> >>>> Thank You! >>>> >>>> >>>> On Thu, May 22, 2014 at 12:40 AM, Roger Meier <[email protected]> >>>> wrote: >>>> >>>> Hi Chamila >>>>> >>>>> >>>>> Quoting Chamila Wijayarathna <[email protected]>: >>>>> >>>>> Hi Roger, >>>>> >>>>>> >>>>>> I think now we have a good automated test reporting? Do I have do to >>>>>> any >>>>>> modification on this? >>>>>> >>>>>> I'm fine with this for the moment. >>>>> Everybody is now able to browse the tested combinations and results. >>>>> >>>>> >>>>> If not what should I do next? Do you have any suggestions on tasks to >>>>> >>>>>> implement next. >>>>>> Since in cross language test suite, it only tests nodejs with cpp, I >>>>>> think >>>>>> nodejs-nodejs, nodejs-java and java-nodejs tests are suitable as next >>>>>> task. >>>>>> >>>>>> yes, this makes sense. Do as many combinations as possible and add >>>>> language by language. >>>>> >>>>> please check also that TestClient and TestServers follow the parameter >>>>> signatures >>>>> and return value definitions: http://thrift.apache.org/test/ >>>>> >>>>> What do you think? >>>>> >>>>>> >>>>>> yes proceed with this. >>>>> >>>>> -roger >>>>> >>>>> >>>>> Thank You! >>>>> >>>>>> >>>>>> >>>>>> On Fri, May 16, 2014 at 9:17 PM, Chamila Wijayarathna < >>>>>> [email protected]> wrote: >>>>>> >>>>>> Patch attached at https://issues.apache.org/jira/browse/THRIFT-2534. >>>>>> >>>>>>> >>>>>>> >>>>>>> On Fri, May 16, 2014 at 9:07 PM, Chamila Wijayarathna < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>> Sorry, status.html is attached here. >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Fri, May 16, 2014 at 9:06 PM, Chamila Wijayarathna < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>> Hi Roger, >>>>>>>> >>>>>>>>> I generated status.html I have attached with this. Please let me >>>>>>>>> know >>>>>>>>> what else should be added here. >>>>>>>>> Thank You! >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, May 16, 2014 at 1:19 PM, Chamila Wijayarathna < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>> Created a sub task and added patch. >>>>>>>>> >>>>>>>>>> https://issues.apache.org/jira/browse/THRIFT-2534 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Fri, May 16, 2014 at 1:16 PM, Roger Meier < >>>>>>>>>> [email protected] >>>>>>>>>> >wrote: >>>>>>>>>> >>>>>>>>>> yes, just creat a sub Task for THRIFT-847 >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> thanks >>>>>>>>>>> roger >>>>>>>>>>> >>>>>>>>>>> Quoting Chamila Wijayarathna <[email protected]>: >>>>>>>>>>> >>>>>>>>>>> Hi Roger, >>>>>>>>>>> >>>>>>>>>>> I'll start working on that. >>>>>>>>>>>> Shall I create a Jira for this and add patch for current stuff >>>>>>>>>>>> there? >>>>>>>>>>>> Than You. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Thu, May 15, 2014 at 3:52 AM, Roger Meier < >>>>>>>>>>>> [email protected] >>>>>>>>>>>> >wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi Chamila >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> generating this as an additional result out of test.sh is good >>>>>>>>>>>>> first >>>>>>>>>>>>> step. >>>>>>>>>>>>> >>>>>>>>>>>>> attached is a template for the second step: >>>>>>>>>>>>> git apply test_status.diff >>>>>>>>>>>>> >>>>>>>>>>>>> it uses jquery datatables, a simple and useful table control >>>>>>>>>>>>> we can add filter functions to the table, etc. >>>>>>>>>>>>> >>>>>>>>>>>>> you can generate status.html >>>>>>>>>>>>> or generate status.json and load the table within status.html >>>>>>>>>>>>> from >>>>>>>>>>>>> status.json >>>>>>>>>>>>> (e.g. use https://datatables.net/manual/data#Objects as >>>>>>>>>>>>> initialization >>>>>>>>>>>>> method) >>>>>>>>>>>>> >>>>>>>>>>>>> thanks >>>>>>>>>>>>> roger >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Quoting Chamila Wijayarathna <[email protected]>: >>>>>>>>>>>>> >>>>>>>>>>>>> Hi Roger, >>>>>>>>>>>>> >>>>>>>>>>>>> As we discussed earlier I have changed test.sh to write >>>>>>>>>>>>> results of >>>>>>>>>>>>> >>>>>>>>>>>>>> cross >>>>>>>>>>>>>> language test run to a status.md file. I have attached a >>>>>>>>>>>>>> sample >>>>>>>>>>>>>> status.mdgenerated. >>>>>>>>>>>>>> I observed that in commit "THRIFT-847 Test Framework >>>>>>>>>>>>>> harmonization >>>>>>>>>>>>>> across >>>>>>>>>>>>>> all languages (commit 4edac7ff085e4bd28096fef3cf8234 >>>>>>>>>>>>>> e4991544ff)" >>>>>>>>>>>>>> you have >>>>>>>>>>>>>> wrote results of failed test to an error.log file. Are we >>>>>>>>>>>>>> planning >>>>>>>>>>>>>> to keep >>>>>>>>>>>>>> both status.md and error.log or only one from them? >>>>>>>>>>>>>> What do you think about the format of status.md? I am only >>>>>>>>>>>>>> writing >>>>>>>>>>>>>> success/failure, no any description in failure. Is there any >>>>>>>>>>>>>> thing >>>>>>>>>>>>>> else >>>>>>>>>>>>>> needed to be added or is this enough for now? >>>>>>>>>>>>>> Thank You! >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> *Chamila Dilshan Wijayarathna,* >>>>>>>>>>>>>> >>>>>>>>>>>>>> SMIEEE, SMIESL, >>>>>>>>>>>>>> Undergraduate, >>>>>>>>>>>>>> Department of Computer Science and Engineering, >>>>>>>>>>>>>> University of Moratuwa. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>> *Chamila Dilshan Wijayarathna,* >>>>>>>>>>>> SMIEEE, SMIESL, >>>>>>>>>>>> Undergraduate, >>>>>>>>>>>> Department of Computer Science and Engineering, >>>>>>>>>>>> University of Moratuwa. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> *Chamila Dilshan Wijayarathna,* >>>>>>>>>> >>>>>>>>>> SMIEEE, SMIESL, >>>>>>>>>> Undergraduate, >>>>>>>>>> Department of Computer Science and Engineering, >>>>>>>>>> University of Moratuwa. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Chamila Dilshan Wijayarathna,* >>>>>>>>> SMIEEE, SMIESL, >>>>>>>>> Undergraduate, >>>>>>>>> Department of Computer Science and Engineering, >>>>>>>>> University of Moratuwa. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> *Chamila Dilshan Wijayarathna,* >>>>>>>> SMIEEE, SMIESL, >>>>>>>> Undergraduate, >>>>>>>> Department of Computer Science and Engineering, >>>>>>>> University of Moratuwa. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Chamila Dilshan Wijayarathna,* >>>>>>> SMIEEE, SMIESL, >>>>>>> Undergraduate, >>>>>>> Department of Computer Science and Engineering, >>>>>>> University of Moratuwa. >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> *Chamila Dilshan Wijayarathna,* >>>>>> SMIEEE, SMIESL, >>>>>> Undergraduate, >>>>>> Department of Computer Science and Engineering, >>>>>> University of Moratuwa. >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> -- >>>> *Chamila Dilshan Wijayarathna,* >>>> SMIEEE, SMIESL, >>>> Undergraduate, >>>> Department of Computer Science and Engineering, >>>> University of Moratuwa. >>>> >>> >>> >> >> >> -- >> *Chamila Dilshan Wijayarathna,* >> >> SMIEEE, SMIESL, >> Undergraduate, >> Department of Computer Science and Engineering, >> University of Moratuwa. >> > > > > -- > *Chamila Dilshan Wijayarathna,* > SMIEEE, SMIESL, > Undergraduate, > Department of Computer Science and Engineering, > University of Moratuwa. > -- *Chamila Dilshan Wijayarathna,* SMIEEE, SMIESL, Undergraduate, Department of Computer Science and Engineering, University of Moratuwa.
From 6557b73ff2902d0fd7ed806e5aff644416af5f54 Mon Sep 17 00:00:00 2001 From: cdwijayarathna <[email protected]> Date: Tue, 27 May 2014 22:41:02 +0530 Subject: [PATCH] THRIFT-847 Test Framework harmonization across all languages --- lib/nodejs/test/client.js | 17 +++++++++++++++-- lib/nodejs/test/server.js | 9 ++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib/nodejs/test/client.js b/lib/nodejs/test/client.js index d57676e..834448b 100644 --- a/lib/nodejs/test/client.js +++ b/lib/nodejs/test/client.js @@ -33,10 +33,23 @@ var program = require('commander'); program .option('-p, --protocol <protocol>', 'Set thrift protocol (binary|json) [protocol]') .option('-t, --transport <transport>', 'Set thrift transport (buffered|framed) [transport]') + .option('--port <port>', 'Set thift server port number to connect') + .option('--host <host>', 'Set thift server host to connect') .option('--ssl', 'use SSL transport') .option('--promise', 'test with promise style functions') .parse(process.argv); +var host = "localhost"; +if(String(program.host) === "undefined"){ +}else{ + host = program.host; +} + +var port = 9090; +if(String(program.port) === "undefined"){ +}else{ + port = program.port; +} var protocol = thrift.TBinaryProtocol; if (program.protocol === "json") { @@ -59,9 +72,9 @@ var connection; if (program.ssl) { options.rejectUnauthorized = false; - connection = thrift.createSSLConnection('localhost', 9090, options); + connection = thrift.createSSLConnection(host, port, options); } else { - connection = thrift.createConnection('localhost', 9090, options); + connection = thrift.createConnection(host,port, options); } var client = thrift.createClient(ThriftTest, connection); diff --git a/lib/nodejs/test/server.js b/lib/nodejs/test/server.js index 6afff07..8e31a7d 100644 --- a/lib/nodejs/test/server.js +++ b/lib/nodejs/test/server.js @@ -29,6 +29,7 @@ var program = require('commander'); program .option('-p, --protocol <protocol>', 'Set thift protocol (binary|json) [protocol]') .option('-t, --transport <transport>', 'Set thift transport (buffered|framed) [transport]') + .option('--port <port>', 'Set thift server port') .option('--ssl', 'use ssl transport') .option('--promise', 'test with promise style functions') .parse(process.argv); @@ -45,6 +46,12 @@ if (program.protocol === "json") { protocol = thrift.TCompactProtocol; } +var port = 9090; +if(String(program.port) === "undefined"){ +}else{ + port = program.port; +} + var handler = ThriftTestHandler; if (program.promise) { handler = ThriftTestHandlerPromise; @@ -60,5 +67,5 @@ if (program.ssl) { cert: fs.readFileSync(path.resolve(__dirname, 'server.crt')) }; } -thrift.createServer(ThriftTest, handler, options).listen(9090); +thrift.createServer(ThriftTest, handler, options).listen(port); -- 1.9.1
