Acceptance Test

Use Case #1

Build #0661

Test 1

Description: A customer calls in for a cab to arrive 30+ minutes from now and requests a cab a "valid" ETA is returned. A valid ETA is defined as one that at least the current system time plus the minimum ETA delta (defined in scheduler documentation).

Assumptions: 

1.      Customer info is complete (name, pick-up and drop-off address, and drop-off time

2.      All system clocks in sync with some reasonable error epsilon (no more than 1 second)

Procedure:

1.      Start up system server by running setup_model_rmi_server.bat in D:\eclipse\workspace\DemoProject on one lab machine

2.      Start up 2 DispatcherUIs on 2 separate machines making sure to update the machine ip address* in setup_dispatcher_ui_rmi_client.bat and then start the batch files

3.      In each DispatcherUI enter a fake customer that is unique and meets the aforementioned specifications.

4.      If an ETA is returned that meets aforementioned specs, then PASS

*Cab Consoles and DispatcherUI cannot be run any machine that has "Special software for 451 label" on it. That machine is running on VMWare and will not work properly due to an IP resolution issue through no fault off our software

Input:

<see Acceptance Test #2>

Output:

<see Acceptance Test #2>

Result: PASS

This test is a subset of Acceptance Test #2 and therefore passes since Acceptance Test #2 passes

 

Test 2

Description: A customer calls in for a cab to arrive zero to "minimum ETA delta" minutes from now and requests a cab a "valid" ETA is returned. A valid ETA is defined as one that at least the current system time and no more than the current system plus the minimum ETA delta (defined in scheduler documentation).

Assumptions: 

1.      Customer info is complete (name, pick-up and drop-off address, and drop-off time

2.      All system clocks in sync with some reasonable error epsilon (no more than 1 second)

Procedure:

1.      Start up system server by running setup_model_rmi_server.bat in D:\eclipse\workspace\DemoProject on one lab machine

2.      Start up 3 DispatcherUIs on 3 separate machines making sure to update the machine ip address* in setup_dispatcher_ui_rmi_client.bat and then start the batch files

3.      In each DispatcherUI enter a fake customer that is unique and meets the aforementioned specifications.

4.      If an ETA is returned that meets aforementioned specs, then PASS

*Cab Consoles and DispatcherUI cannot be run any machine that has "Special software for 451 label" on it. That machine is running on VMWare and will not work properly due to an IP resolution issue through no fault off our software

Input:

Two separate customers: Joe Cool345 and Joe Cool789 with pickup times 19:55 and 19:29 respectively

Output:

<Dispatcher: 128.95.8.56>

128.95.8.50

RMI connection successful

RMI connection successful

Wed Aug 14 12:52:00 PDT 2002

ETA : 12:52

 

<Dispatcher UI: 128.95.8.56>

Cool789, Joe

Phone Number: 555-555-5555

Pickup Address: 123 Fake St

Destination: 987 Z Blvd

Pickup Time: 19:29

Pickup Date: 08-09-2002

Number in Party: 1

Cab Type: X

ETA: 20:58

 

<Dispatcher: 128.208.8.43>

128.95.8.50

RMI connection successful

RMI connection successful

Wed Aug 14 12:58:00 PDT 2002

ETA : 12:58

 

<Dispatcher UI: 128.208.8.43>

Cool345, Joe

Phone Number: 555-555-5555

Pickup Address: 123 Fake St

Destination: 987 Z Blvd

Pickup Time: 19:55

Pickup Date: 08-09-2002

Number in Party: 1

Cab Type: X

ETA: 20:13

 

<Server: 128.95.8.50>

Creating ModelRMIInterface...

 

DataStoreConnection - constructor username = mirvin: passwd = 403mirvin

Try to read for points from Database

found x: 101 y: 165

found x: 147 y: 66

found x: 260 y: 171

Finished reading from points from database

3Got mouse click @ x: 101 y: 165

1

6

Got mouse click @ x: 147 y: 66

2

8

Got mouse click @ x: 260 y: 171

3

10

insert into mapdata values('woohaa.gif',12282417,12198639,4796028,4738444)

insert into polygonvertices values(1,1,101.0,165.0)

insert into polygonvertices values(2,1,147.0,66.0)

insert into polygonvertices values(3,1,260.0,171.0)

47.96028

47.38444

122.82417

121.98639

Model got 10 zones

Number of zones created : 10

zone_0 id : 0

zone_1 id : 1

zone_2 id : 2

zone_3 id : 3

zone_4 id : 4

zone_5 id : 5

zone_6 id : 6

zone_7 id : 7

zone_8 id : 8

zone_9 id : 9

*********   Begin : registerCabToModel  ***********

registering cab console : 1   driver : 2    gps : (122.39399,47.386948)

 

*********   Begin : string2gps  ***********

x : 122.39399

y : 47.38694

x : 122.39399

y : 47.38694

*********   End : string2gps  ***********

console 1 registered to zone 3

*********   End : registerCabToModel 5  ***********

*********   Begin : registerCabToModel  ***********

registering cab console : 3   driver : 4    gps : (122.273506,47.675957)

 

*********   Begin : string2gps  ***********

x : 122.273506

y : 47.67595

x : 122.273506

y : 47.67595

*********   End : string2gps  ***********

console 3 registered to zone 3

*********   End : registerCabToModel 5  ***********

ModelRMI addCustomer

 

Got customer

name : Joe Cool345

phone number : 555-555-5555

thread created with method: addCustomer

 

addCustomer Thread Created.

Thread Running

*********   Begin : addCustomer  ***********

firstname: Joe

last name : Cool345

phone : 555-555-5555

call in time : Fri Aug 09 19:29:10 PDT 2002

pickup add : 123 Fake St

pick up time : Wed Aug 14 12:52:00 PDT 2002

dest add : 987 Z Blvd

*********   Begin : getZone  ***********

*********   End : getZone  ***********

*********   Begin : getZone  ***********

*********   End : getZone  ***********

ETA is SET

pickup zone id : 3

destination zone id : 0

Customer pickup TIME : Wed Aug 14 12:52:00 PDT 2002

Insert into RideRequests values('Cool345', 'Joe', '555-555-5555', 'false', '', '

2002-08-09 19:29:10.466', '2002-08-14 12:52:00.0', '123 Fake St', 3, '987 Z Blvd

', 0, 1)

Error: SQL exception - addCustomer

java.sql.SQLException: ERROR:  <unnamed> referential integrity violation - key r

eferenced from riderequests not found in zones

 

        at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)

        at org.postgresql.Connection.ExecSQL(Connection.java:398)

        at org.postgresql.jdbc2.Statement.execute(Statement.java:130)

        at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)

        at taxisrus.implementation.DataStoreConnection.addRideRequest(DataStoreC

onnection.java:252)

        at taxisrus.implementation.Model.addCustomer(Model.java:179)

        at taxisrus.implementation.rmi.ModelRMIThread.run(ModelRMIThread.java:38

)

        at taxisrus.implementation.rmi.ModelRMI.addCustomer(ModelRMI.java:58)

        at java.lang.reflect.Method.invoke(Native Method)

        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)

        at sun.rmi.transport.Transport$1.run(Transport.java:142)

        at java.security.AccessController.doPrivileged(Native Method)

        at sun.rmi.transport.Transport.serviceCall(Transport.java:139)

        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4

43)

        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport

.java:643)

        at java.lang.Thread.run(Thread.java:484)

End of addCustomer in Model

******************************  BUSY CAB LIST ********************

NO BUSY CABS

******************************  END ******************************

*********   End : addCustomer  ***********

addCustomer Thread Finished

addCustomer Thread Stopped

12:52

ModelRMI addCustomer

 

Got customer

name : Joe Cool789

phone number : 555-555-5555

thread created with method: addCustomer

 

addCustomer Thread Created.

Thread Running

*********   Begin : addCustomer  ***********

firstname: Joe

last name : Cool789

phone : 555-555-5555

call in time : Fri Aug 09 19:29:38 PDT 2002

pickup add : 123 Fake St

pick up time : Wed Aug 14 12:58:00 PDT 2002

dest add : 987 Z Blvd

*********   Begin : getZone  ***********

*********   End : getZone  ***********

*********   Begin : getZone  ***********

*********   End : getZone  ***********

ETA is SET

pickup zone id : 3

destination zone id : 0

Customer pickup TIME : Wed Aug 14 12:58:00 PDT 2002

Insert into RideRequests values('Cool789', 'Joe', '555-555-5555', 'false', '', '

2002-08-09 19:29:38.81', '2002-08-14 12:58:00.0', '123 Fake St', 3, '987 Z Blvd'

, 0, 1)

End of addCustomer in Model

******************************  BUSY CAB LIST ********************

NO BUSY CABS

******************************  END ******************************

*********   End : addCustomer  ***********

addCustomer Thread Finished

addCustomer Thread Stopped

12:58

*********   Begin : updateModelInfo  ***********

cab info : 3

2

Fri Aug 09 19:33:34 PDT 2002

Result: PASS

The ETA was returned as it was suppose to be. However, it should be noted that a SQL error (which did not affect the test) was mentioned on the server: Look at the above output data from the server for details.

Error: SQL exception - addCustomer

java.sql.SQLException: ERROR:  <unnamed> referential integrity violation - key r

eferenced from riderequests not found in zones