failure is an when an assertion is false, error is when something unexpected happens
/Marcus On Sun, Apr 8, 2012 at 10:19 AM, Waqas Iftikhar <coldheart...@gmail.com>wrote: > I am running a drizzle server and mysql server with test_units_jdbc > database. > Ports are correct. Can you please tell me the difference between Failure > and Error in a test? I am trying to debug this issue. > > > On Sun, Apr 8, 2012 at 9:40 AM, Marcus Eriksson <krum...@gmail.com> wrote: > >> it compiles and tests run fine for me, could you please give more >> information? >> >> /Marcus >> >> >> On Sun, Apr 8, 2012 at 12:49 AM, Waqas Iftikhar >> <coldheart...@gmail.com>wrote: >> >>> Mr. Erikkson edited the code like you has suggested. Ran tests on >>> network and local host both. Out of 290 tests these 12 tests report with >>> error (point to be noted these tests report error even if compile a fresh >>> copy of source i.e without editing).Can you suggest some fix so then i can >>> upload the branch and request for merge? >>> >>> >>> 1. cancelQuery(org.drizzle.jdbc.CancelTest) >>> 2. timeoutQuery(org.drizzle.jdbc.CancelTest) >>> 3. timeoutPrepQuery(org.drizzle.jdbc.CancelTest) >>> 4. testExceptionDivByZero(org.drizzle.jdbc.DriverTest) >>> 5. primaryKeysTest(org.drizzle.jdbc.DatabaseMetadataTest) >>> 6. exportedKeysTest(org.drizzle.jdbc.DatabaseMetadataTest) >>> 7. importedKeysTest(org.drizzle.jdbc.DatabaseMetadataTest) >>> 8. testGetTables(org.drizzle.jdbc.DatabaseMetadataTest) >>> 9. testGetTables2(org.drizzle.jdbc.DatabaseMetadataTest) >>> 10. testGetColumns(org.drizzle.jdbc.DatabaseMetadataTest) >>> 11. dbmetaTest(org.drizzle.jdbc.DatabaseMetadataTest) >>> 12. testBoolean(org.drizzle.jdbc.BooleanTest) >>> >>> On Fri, Apr 6, 2012 at 2:08 AM, Waqas Iftikhar >>> <coldheart...@gmail.com>wrote: >>> >>>> Till when do you suggest we submit the reworked patch of code? As our >>>> GSoC proposals submissions are few hours away and we also have to work on >>>> that a lot. Can we submit it after proposal submissions? >>>> >>>> >>>> On Fri, Apr 6, 2012 at 2:03 AM, Waqas Iftikhar >>>> <coldheart...@gmail.com>wrote: >>>> >>>>> And do you suggest cleaning the code that means removing all the >>>>> highlighted code lines like connection for mysql in every test and others? >>>>> >>>>> >>>>> On Fri, Apr 6, 2012 at 2:02 AM, Waqas Iftikhar <coldheart...@gmail.com >>>>> > wrote: >>>>> >>>>>> >>>>>> >>>>>>> * i only see the issue fixed in one place, ResultsetUnsupportedTest. >>>>>>> >>>>>> >>>>>> The DriverTest class consists of two static variables, host (which >>>>>> was already there) and mysql_host. These variables can be accessed >>>>>> anywhere >>>>>> in the package. Since ResultUnsupportedMethodsTest is the first test to >>>>>> be >>>>>> executed, we get the command line arguments using the System.getProperty >>>>>> method and set the values for both the variables allowing them to be used >>>>>> in the following tests. >>>>>> >>>>>> * dont copy and paste code everywhere, create a method, use that >>>>>>> method wherever you need a connection >>>>>>> >>>>>> >>>>>> Will do that. We'll create a separate class containing static >>>>>> variables as well as a static method to establish and get a connection. >>>>>> The >>>>>> existing code used different hard coded ports in different parts of code. >>>>>> Hence, the reason we did not use a single method. We will set the default >>>>>> address and port for Drizzle will be "localhost" and "4427" and for MySQL >>>>>> "localhost" and "3306" respectively, unless specified otherwise by the >>>>>> user >>>>>> on the command line. Or do you suggest making a static method in any >>>>>> already existing class like DriverTest.java which also has two static >>>>>> variables being used for address. >>>>>> >>>>>> >>>>>>> * follow code style, when submitting patches to open source >>>>>>> projects, read through the existing code and see how the code is written >>>>>>> >>>>>> >>>>>> Will definitely look at that and follow it from now onwards >>>>>> >>>>>> >>>>>>> * test before submitting >>>>>>> >>>>>> We have tested the code after making changes. Total are 290 tests. We >>>>>> were having issues getting remote access on mysql server and as our >>>>>> proposal submission of GSoC is only few hours away so we were already >>>>>> short >>>>>> of time thats why we skipped the tests in MySQLDrivertest class. This >>>>>> class >>>>>> performs 70 tests so now 290-70 = 220 were performed by maven out of >>>>>> which >>>>>> 2 were skipped by maven, 2 Failures and 16 reported errors. Rest 200 >>>>>> tests >>>>>> worked fine. >>>>>> >>>>>>> * dont call variables "abc" - name them something that describes >>>>>>> what they do >>>>>>> >>>>>> >>>>>> Ah, yes. An error on our part. We will change all such instances to >>>>>> something more meaningful. >>>>>> >>>>>> >>>>>>> /Marcus >>>>>>> >>>>>>> >>>>>>> On Thu, Apr 5, 2012 at 9:36 PM, Marcus Eriksson >>>>>>> <krum...@gmail.com>wrote: >>>>>>> >>>>>>>> i dont really see how that patch could work >>>>>>>> >>>>>>>> ill comment more in detail off-list >>>>>>>> >>>>>>>> /Marcus >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Apr 5, 2012 at 9:07 PM, Waqas Iftikhar < >>>>>>>> coldheart...@gmail.com> wrote: >>>>>>>> >>>>>>>>> We have done what you have suggested and uploaded the diff and >>>>>>>>> files on github. >>>>>>>>> Link: >>>>>>>>> https://github.com/coldheartpks/DrizzleJDBC/commit/4eb265e884fd76344c26ff8ebb879499f272f3dc >>>>>>>>> We can test now by using >>>>>>>>> -Ddrizzle.test.address=8.8.8.8<http://8.8.8.8:3306/>-Dmysql.test.address= >>>>>>>>> 8.8.8.8 <http://8.8.8.8:3306/> (do not specify port, then it will >>>>>>>>> use the default port set in code) >>>>>>>>> OR >>>>>>>>> -Ddrizzle.test.address=8.8.8.8:4427 >>>>>>>>> <http://8.8.8.8:3306/>-Dmysql.test.address= >>>>>>>>> 8.8.8.8:3306 >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Thu, Apr 5, 2012 at 1:38 AM, Waqas Iftikhar < >>>>>>>>> coldheart...@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> For this we will need to have a user which has the privilege to >>>>>>>>>> access database "unit_test_jdbc" over the network remotely as root >>>>>>>>>> user >>>>>>>>>> cannot connect to drizzle remotely. >>>>>>>>>> >>>>>>>>>> So what do you suggest should the tester give the whole >>>>>>>>>> connection string in argument to maven like : >>>>>>>>>> -Ddrizzle.test.string=waqas@8.8.8.8:3306 >>>>>>>>>> OR >>>>>>>>>> give address and user name in separate parameters >>>>>>>>>> -Ddrizzle.test.address=8.8.8.8:3306 -Ddrizzle.test.user=waqas >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wed, Apr 4, 2012 at 11:01 PM, Marcus Eriksson < >>>>>>>>>> krum...@gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Wed, Apr 4, 2012 at 7:08 PM, Waqas Iftikhar < >>>>>>>>>>> coldheart...@gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hello Mr. Eriksson, >>>>>>>>>>>> >>>>>>>>>>>> We've been working on the code of the JDBC testing suite to >>>>>>>>>>>> incorporate the changes you suggested. We've succeeded in passing >>>>>>>>>>>> the >>>>>>>>>>>> address of the Drizzle server to connect to the testing code from >>>>>>>>>>>> the >>>>>>>>>>>> command line. While running the code, we have noticed that the >>>>>>>>>>>> connection >>>>>>>>>>>> is established on 3 ports 3306, 3307 and 4427. The tests on port >>>>>>>>>>>> 3306 and >>>>>>>>>>>> 4427 are a success after amending the source code. However, the >>>>>>>>>>>> testing >>>>>>>>>>>> suite is unable to establish connection to the server on port 3307 >>>>>>>>>>>> since >>>>>>>>>>>> there's Drizzle server is not listening on that port. >>>>>>>>>>>> >>>>>>>>>>>> We have a suggestion here. Why don't we also take the port >>>>>>>>>>>> number to connect to as a parameter as well along with the >>>>>>>>>>>> addresses as >>>>>>>>>>>> well. Something like this, -Ddrizzle.test.address=8.8.8.8:3306. >>>>>>>>>>>> What are your thoughts on this? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> yes, of course, include the port >>>>>>>>>>> >>>>>>>>>>> /Marcus >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Regards Waqas >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Regards Waqas >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Regards Waqas >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards Waqas >>>>> >>>> >>>> >>>> >>>> -- >>>> Regards Waqas >>>> >>> >>> >>> >>> -- >>> Regards Waqas >>> >> >> > > > -- > Regards Waqas >
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : drizzle-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp