Acceptance Test 

Use Case # 3

Build #0891

Test 1

Description: 

A dispatcher needs to remove a customer reservation that was previously added to the customer queue.

Assumption:

The server output is a true representation of the activity running in the internals of the system.   

Procedure:

1.      Start up the system as in the acceptance test #1, until an ETA is returned. I.e. run the following     procedure:  

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

§         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.

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

§         Pressed make reservation button in one of the DispatcherUI until an ETA is returned.

2.      Press the remove customer button on the other DispatcherUI. 

3.      If the same customer is removed then accept.

Input:
 
Several customers using the “Test” button on the DispatcherUI and slightly modifying the name

 

Output:
 <Remove Customer Test>

<server: 128.95.8.139>

......

Zone 8 :  no free cabs

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

*********   End : moveCabFromZoneToBusy 1  ***********

cabIsScheduled : cust. pickup time : Wed Aug 14 18:41:00 PDT 2002

Customer corresponding to Cab has no pickUpTime - DataStoreConnection.storeRideA

ssignment

delete from rideRequests where lastname='Cool' and firstname='Joef4' and phone =

 '555-555-5555' and eta='2002-08-14 19:01:28.0'

select DISTINCT * from customers where lastname='Cool' and firstname='Joef4' and

 phone='555-555-5555'

insert into customers values('Cool', 'Joef4', '555-555-5555', 'false', '')

Error: SQL exception - storeCabRideAssignment

java.sql.SQLException: ERROR:  Cannot insert a duplicate key into unique index c

ustomers_pkey

 

        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.storeCabRideAssignment(Da

taStoreConnection.java:476)

        at taxisrus.implementation.Model.cabIsScheduled(Model.java:588)

        at taxisrus.implementation.Scheduler.confirmCab(Scheduler.java:349)

        at taxisrus.implementation.scheduler_stuff.CabCommunicationTask.iterateT

hroughCabList(CabCommunicationTask.java:133)

        at taxisrus.implementation.scheduler_stuff.CabCommunicationTask.run(CabC

ommunicationTask.java:70)

        at java.util.TimerThread.mainLoop(Timer.java:435)

        at java.util.TimerThread.run(Timer.java:385)

Datastore failure in CabIsScheduled

*********   End : cabIsScheduled 3  ***********

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

cab info : 3

2

Wed Aug 14 18:41:44 PDT 2002

 

******************************

updateModelCabInfo        1

Customer Pickup cab id : 3

Scheduler customerPickup: removed customer

Customer setStatus status : 5

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

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

cab id : 3   customer last name : Cool

**************  FREE CABS   ****************

Zone 0 : 1

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

thread created with method: getCustomer

 

getCustomer Thread Created.

Thread Running

*********   Begin : getCustomer  ***********

*********   End : getCustomer  ***********

getCustomer Thread Finished

getCustomer Thread Stopped

thread created with method: getCustomer

 

getCustomer Thread Created.

Thread Running

*********   Begin : getCustomer  ***********

*********   End : getCustomer  ***********

getCustomer Thread Finished

getCustomer Thread Stopped

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

cab info : 3

0

(122.44411,47.54986)

1.2

1.416

Wed Aug 14 18:43:17 PDT 2002

 

******************************

updateModelCabInfo        1

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

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

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

gps is taxisrus.implementation.CabConsole.GPS@1d5a0

mapper exists

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

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

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

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

Joef4

Wed Aug 14 18:43:17 PDT 2002

No ride has been recorded that matches this one!

*********   Begin : moveCabFromBusyToZone  ***********

*********   End : moveCabFromBusyToZone 1  ***********

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 1   3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

ModelRMI addCustomer

 

Got customer

name : Joef5 Cool

phone number : 555-555-5555

thread created with method: addCustomer

 

addCustomer Thread Created.

Thread Running

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

firstname: Joef5

last name : Cool

phone : 555-555-5555

call in time : Wed Aug 14 18:43:54 PDT 2002

pickup add : 123 Fake St

pick up time : Wed Aug 14 18:43:00 PDT 2002

dest add : 987 Z Blvd

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

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

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

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

Customer setStatus status : 0

ETA is SET

Customer pickup TIME : Wed Aug 14 18:43:00 PDT 2002

Insert into RideRequests values('Cool', 'Joef5', '555-555-5555', 'false', '', '2

002-08-14 18:43:54.0', '2002-08-14 19:03:54.0', '123 Fake St', 0, '987 Z Blvd',

0, 1)

Pickup zone : 0

Dest zone : 0

End of addCustomer in Model

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 1   3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

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

addCustomer Thread Finished

addCustomer Thread Stopped

19:3

Customer setStatus status : 1

Accessing cab in CabComm

*********   Begin : getAllCabs  ***********

*********   End : getAllCabs  ***********

*********   Begin : rideRequest  ***********

 

RIDE REQUEST FOR : Cool with cab_id : 1

 

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 1   3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

 

Received REJECT from cab console

 

Insert into RideDenials values(1, '2002-08-14 18:44:19.0')

*********   End : rideRequest  ***********

*********   Begin : cabRefusedRide  ***********

*********   End : cabRefusedRide  ***********

Accessing cab in CabComm

*********   Begin : getAllCabs  ***********

*********   End : getAllCabs  ***********

*********   Begin : rideRequest  ***********

 

RIDE REQUEST FOR : Cool with cab_id : 3

 

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 3   1

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

 

Received REJECT from cab console

 

Insert into RideDenials values(3, '2002-08-14 18:44:40.0')

*********   End : rideRequest  ***********

*********   Begin : cabRefusedRide  ***********

*********   End : cabRefusedRide  ***********

Accessing cab in CabComm

*********   Begin : getAllCabs  ***********

*********   End : getAllCabs  ***********

*********   Begin : rideRequest  ***********

 

RIDE REQUEST FOR : Cool with cab_id : 1

 

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 1   3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

 

Received REJECT from cab console

 

Insert into RideDenials values(1, '2002-08-14 18:45:01.0')

*********   End : rideRequest  ***********

*********   Begin : cabRefusedRide  ***********

*********   End : cabRefusedRide  ***********

Accessing cab in CabComm

*********   Begin : getAllCabs  ***********

*********   End : getAllCabs  ***********

*********   Begin : rideRequest  ***********

 

RIDE REQUEST FOR : Cool with cab_id : 3

 

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 3   1

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

thread created with method: getCustomer

 

getCustomer Thread Created.

Thread Running

*********   Begin : getCustomer  ***********

*********   End : getCustomer  ***********

getCustomer Thread Finished

getCustomer Thread Stopped

thread created with method: cancelCustomer

 

cancelCustomer Thread Created.

Thread Running

*********   Begin : cancelCustomer  ***********

*********   Begin : getCustomer  ***********

*********   End : getCustomer  ***********

Customer setStatus status : 4

Delete from RideRequests where lastname = 'Cool' AND phone = '555-555-5555' AND

ETA = '2002-08-14 19:03:54.0'

*********   End : cancelCustomer 1  ***********

cancelCustomer Thread Finished

cancelCustomer Thread Stopped

 

Received REJECT from cab console

 

Insert into RideDenials values(3, '2002-08-14 18:45:21.0')

*********   End : rideRequest  ***********

*********   Begin : cabRefusedRide  ***********

*********   End : cabRefusedRide  ***********

 

<dispatcher: 128.95.8.139>

RMI connection successful

RMI connection successful

ETA : 18:55

 

oldCustomer is: Cool

ETA : 18:57

 

oldCustomer is: Cool

ETA : 18:58

 

oldCustomer is: Cool

ETA : 19:0

 

oldCustomer is: Cool

ETA : 19:1

 

oldCustomer is NULL

oldCustomer is NULL

ETA : 19:3

 

oldCustomer is: Cool

 

<cabconsole: 128.95.8.139>

RMI connection successful

RMI connection successful

successful registration

 

<dispatcher: 128.95.8.61>

RMI connection successful

RMI connection successful

 

<cabconsole: 128.95.8.61>

RMI connection successful

RMI connection successful

successful registration

 

<Change Customer Test>

<server: 128.95.8.139>

...

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : changeCustomer  ***********

changeCustomer Thread Finished

changeCustomer Thread Stopped

Changed ETA: 19:35

 

Received OK from cab console

 

*********   End : rideRequest  ***********

Recieved accept response from CabConsole from cab3

*********   Begin : cancelCab  ***********

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 2  ***********

 

cab not found in the busy list in function CancelCab in the Model

 

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

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

cab info : 3

3

(122.372955,47.745674)

0.0

0.0

Wed Aug 14 19:15:40 PDT 2002

 

******************************

updateModelCabInfo        1

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

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

*********   Begin : moveCabFromBusyToZone  ***********

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : moveCabFromBusyToZone 2  ***********

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

*********   End : cancelCab  ***********

Customer setStatus status : 1

Accessing cab in CabComm

*********   Begin : getAllCabs  ***********

*********   End : getAllCabs  ***********

*********   Begin : rideRequest  ***********

 

RIDE REQUEST FOR : Bob with cab_id : 3

 

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

 

Received REJECT from cab console

 

Insert into RideDenials values(3, '2002-08-14 19:15:46.0')

*********   End : rideRequest  ***********

*********   Begin : cabRefusedRide  ***********

*********   End : cabRefusedRide  ***********

Accessing cab in CabComm

*********   Begin : getAllCabs  ***********

*********   End : getAllCabs  ***********

*********   Begin : rideRequest  ***********

 

RIDE REQUEST FOR : Bob with cab_id : 3

 

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   Begin : makeStringForCabConsole  ***********

*********   End : makeStringForCabConsole  ***********

 

Received OK from cab console

 

*********   End : rideRequest  ***********

Recieved accept response from CabConsole from cab3

Customer setStatus status : 2

*********   Begin : cabIsScheduled  ***********

*********   Begin : moveCabFromZoneToBusy  ***********

MoveCabFromZoneToBusy : cabid : 3   zoneid : 0

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

MoveCabFromZoneToBusy 2

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

cab id : 1   customer last name : Cool1

cab id : 3   customer last name : Bob

**************  FREE CABS   ****************

Zone 0 :  no free cabs

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : moveCabFromZoneToBusy 1  ***********

cabIsScheduled : cust. pickup time : Wed Aug 14 19:14:00 PDT 2002

Customer corresponding to Cab has no pickUpTime - DataStoreConnection.storeRideA

ssignment

delete from rideRequests where lastname='Bob' and firstname='Joe' and phone = '5

55-555-5555' and eta='2002-08-14 19:35:33.0'

select DISTINCT * from customers where lastname='Bob' and firstname='Joe' and ph

one='555-555-5555'

insert into customers values('Bob', 'Joe', '555-555-5555', 'false', '')

insert into rideLog values ('Bob', '555-555-5555', 3, 'false', '', '2002-08-14 1

9:15:32.0', '2002-08-14 19:35:33.0', NULL, '123 5th St', 0, '987 Z Blvd', 0, 1,

0.0, 'false', 0.0)

*********   End : cabIsScheduled 4  ***********

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

cab info : 3

2

Wed Aug 14 19:16:11 PDT 2002

 

******************************

updateModelCabInfo        1

Customer Pickup cab id : 3

Scheduler customerPickup: removed customer

Customer setStatus status : 5

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

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

cab id : 1   customer last name : Cool1

cab id : 3   customer last name : Bob

**************  FREE CABS   ****************

Zone 0 :  no free cabs

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

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

cab info : 3

0

(122.17545,47.884163)

2.4

2.832

Wed Aug 14 19:16:13 PDT 2002

 

******************************

updateModelCabInfo        1

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

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

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

gps is taxisrus.implementation.CabConsole.GPS@53cdaa

mapper exists

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

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

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

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

Joe

Wed Aug 14 19:16:13 PDT 2002

*********   Begin : moveCabFromBusyToZone  ***********

*********   End : moveCabFromBusyToZone 1  ***********

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

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

cab info : 1

2

Wed Aug 14 19:16:26 PDT 2002

 

******************************

updateModelCabInfo        1

Customer Pickup cab id : 1

Scheduler customerPickup: removed customer

Customer setStatus status : 5

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

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

cab id : 1   customer last name : Cool1

**************  FREE CABS   ****************

Zone 0 : 3

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

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

cab info : 1

0

(122.28483,47.875)

8.2

9.675999999999998

Wed Aug 14 19:16:28 PDT 2002

 

******************************

updateModelCabInfo        1

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

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

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

*********   Begin : getBusyCab  ***********

*********   End : getBusyCab 1  ***********

gps is taxisrus.implementation.CabConsole.GPS@1a029e

mapper exists

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

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

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

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

Joe1

Wed Aug 14 19:16:28 PDT 2002

*********   Begin : moveCabFromBusyToZone  ***********

*********   End : moveCabFromBusyToZone 1  ***********

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

NO BUSY CABS

**************  FREE CABS   ****************

Zone 0 : 3   1

Zone 1 :  no free cabs

Zone 2 :  no free cabs

Zone 3 :  no free cabs

Zone 4 :  no free cabs

Zone 5 :  no free cabs

Zone 6 :  no free cabs

Zone 7 :  no free cabs

Zone 8 :  no free cabs

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

*********   End : updateModelCabInfo 2  ***********

 

<dispatcher: 128.95.8.139>

RMI connection successful

RMI connection successful

ETA : 19:27

 

oldCustomer is NULL

oldCustomer is: Cool123

ETA : 19:28

 

oldCustomer is NULL

oldCustomer is: Cool123

ETA : 19:30

 

oldCustomer is NULL

oldCustomer is NULL

ETA : 19:32

 

oldCustomer is: Cool1

ETA : 19:32

 

oldCustomer is NULL

oldCustomer is: Cool1

ETA : 19:32

 

ETA : 19:35

 

oldCustomer is NULL

oldCustomer is: Bob

ETA : 19:35

 

<cabconsole: 128.95.8.139>

RMI connection successful

RMI connection successful

successful registration

 

<dispatcher: 128.95.8.61>

RMI connection successful

RMI connection successful

 

<cabconsole: 128.95.8.61>

RMI connection successful

RMI connection successful

successful registration

 

 

Result: Pass

 We tried this test under several conditions to see if we could break the system.

1.      Remove the customer before a cab can accept it

->Cab was revoked by as expected, but a “time out” message was shown. Instead it would be nice if the cab console said that the customer canceled

2.      Remove the customer after it is accepted (before and after the meter is started)

->Didn’t allow for cancel request once meter was started, which is good

3.      Remove the customer after it has been rejected by a cab

->Cab was revoked in the same manner as it was in case 1

 

Test 2

 

Description:

A dispatcher needs to change a customer reservation that was previously added to the customer queue. 

Procedure: 

The same procedure is performed as the above (test 1) except now, press the change reservation in step 3.

Input:
The same as the above.

 

Output:
 

Result: Pass

 

 

prepared by Segfaults
August 15, 2002