Bug 720 - after I run the testQueryByDeptPass2() function in FlightTest class, I found the output is wrong.
Summary: after I run the testQueryByDeptPass2() function in FlightTest class, I found ...
Status: RESOLVED FIXED
Alias: None
Product: Group 05(2022)
Classification: Unclassified
Component: database section (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Assignee: yiweizhao4
URL:
Depends on:
Blocks:
 
Reported: 2022-11-20 14:03 HKT by yiweizhao4
Modified: 2022-11-20 14:07 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yiweizhao4 2022-11-20 14:03:37 HKT
summary:
after I run the testQueryByDeptPass2() function in FlightTest class, I found the output is wrong.

Steps to Reproduce:
1. inFlightTest.java, run the test case testQueryByDeptPass2() 
2. we can see the order of result list.

Expected output:
The order should be sorted by time.

Actual output:
however, it is sorted by another order.
Comment 1 yiweizhao4 2022-11-20 14:07:30 HKT
reason of this bug:
it is caused by the lack of other sort functions in FlightDAO.java, It leads to the flight can only be sorted by FlightID. 

solution:
we can add the sort by time and sort by cost function to FlightDAO.java, so that i t can provide all the sorting algorithms.