DESCRIPTION

Code for hostname management test cases. Related to CBQE-1416

Change-Id: I651d2fbe284a20a6f4719cad9b80ccf7f2b90012


COMMENTS

author: Paige Todd
date: 2013-10-21 12:37:57.606000000

Uploaded patch set 4.

-------------------------------------
author: Trevor Santana
date: 2013-10-21 13:30:17.442000000

Patch Set 4: Code-Review-1

(19 comments)

Line:22, pytests/hostnameTests.py -> unnecessary

Line:25, pytests/hostnameTests.py -> delete it

Line:29, pytests/hostnameTests.py -> use wait_timeout param

Line:49, pytests/hostnameTests.py -> give more informative names, like for build in builds ...

Line:57, pytests/hostnameTests.py -> again, do we need to restart them for all cases?

Line:58, pytests/hostnameTests.py -> give more informative variable name

Line:64, pytests/hostnameTests.py -> self.sleep(timeout, <your_message>),

Line:156, pytests/hostnameTests.py -> no need in use_hostnames at all for this case use spesifically self.initial_use_ip and add_via_hostname

Line:157, pytests/hostnameTests.py -> please build initial cluster first!!! or is this rebalance when you are trying to build it? then no need in nodes_in here, servers_in = servers[:self.nodes_init]

Line:158, pytests/hostnameTests.py -> no need to pass None, timeout has a default value None in cluster.py

Line:163, pytests/hostnameTests.py -> per above comment, servers[nodes_init:nodes_init+nodes_in]

Line:165, pytests/hostnameTests.py -> same as above, and as i can see here we can use nodes_init+nodes_in, based on my comment above
and no need in None

Line:166, pytests/hostnameTests.py -> same as above - unnecessary total_servers variable

Line:174, pytests/hostnameTests.py -> no need in format

Line:176, pytests/hostnameTests.py -> self.sleep(30, <your_message>)

Line:180, pytests/hostnameTests.py -> you are disconnecting only one shell instance, finally instance should be last statement of your cycle

Line:185, pytests/hostnameTests.py -> give more informative variable name

Line:187, pytests/hostnameTests.py -> assertTrue(var.find(node.ip) == -1, <message>) no need in flag variable or ''.join(var).find ... if it's a list
server is listed with port in nodes/self. In clause will not work

Line:9, conf/py-hostnameTests.conf -> there is no initial_cluster, add nodes_init=2

-------------------------------------
author: Fisher Vargas
date: 2013-10-22 06:14:41.527000000

Patch Set 4: Verified-1 Code-Review-1

(16 comments)

Line:16, pytests/hostnameTests.py -> Declare all the data member and member function as private until it is required to be public.

Line:38, pytests/hostnameTests.py -> private function.

Line:45, pytests/hostnameTests.py -> Implement it also as assert here.

Line:48, pytests/hostnameTests.py -> take i as build here.

Line:56, pytests/hostnameTests.py -> ser as server.

Line:59, pytests/hostnameTests.py -> restart_cmd?

Line:60, pytests/hostnameTests.py -> out variable is unused. Write it as _= obj.execute_command(...).

Line:71, pytests/hostnameTests.py -> Choose variable name appropriately. e.g. rest_conn and host_name and so on.

Line:74, pytests/hostnameTests.py -> You can directly do self.assertNotEqual(var, self.servers[1].ip, ...)

Line:100, pytests/hostnameTests.py -> rest_conn.

Line:101, pytests/hostnameTests.py -> Same as above comments.

Line:110, pytests/hostnameTests.py -> See above comments of variable names and assertEqual().

Line:122, pytests/hostnameTests.py -> RemoteMachineShellConnection also have get_hostname() function implemented to get hostname.

Line:128, pytests/hostnameTests.py -> flag = sever.ip == var will also give the same result.

Line:182, pytests/hostnameTests.py -> verify_node_name or verify_host_name?

Line:275, lib/tasks/task.py -> Don't assign in node.hostname, take another variable.

-------------------------------------
author: Paige Todd
date: 2013-11-01 05:46:09.989000000

Abandoned

This depends on another commit which was uploaded later.
So abandoning this change and creating new.

New review created at http://review.couchbase.org/#/c/29737/

-------------------------------------
