Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more pgtap tests for empty set. #8

Closed
2 tasks done
vidhan13j07 opened this issue Jun 6, 2017 · 4 comments
Closed
2 tasks done

Add more pgtap tests for empty set. #8

vidhan13j07 opened this issue Jun 6, 2017 · 4 comments
Assignees
Milestone

Comments

@vidhan13j07
Copy link
Owner

vidhan13j07 commented Jun 6, 2017

  • Add tests from an non-existing starting vertex to a non-existing destination in directed graph.

  • Add tests from an non-existing starting vertex to a non-existing destination in undirected graph.

@vidhan13j07 vidhan13j07 self-assigned this Jun 6, 2017
@vidhan13j07 vidhan13j07 added this to the First milestone Jun 6, 2017
@vidhan13j07 vidhan13j07 changed the title Add more pgtap tests Add more pgtap tests for empty set. Jun 6, 2017
@cvvergara
Copy link

\i setup.sql

SELECT plan(34);

------------
-- testing from an existing starting vertex to an non-existing destination
-----------

- in directed graph
- with restrictions
PREPARE q1 AS  ....

- in indirected graph
- with restrictions
PREPARE q2 AS  ....

- in directed graph
- without restrictions
PREPARE q3 AS  ....

- in indirected graph
- without restrictions
PREPARE q4 AS  ....

@cvvergara
Copy link

@woodbri mentions

A common issue with routing that returns an empty set is when you have a graph that has two+ disconnected networks like: n1-n2 and n3-n4 and you try to route from n1 to n4.

there is no path given the data there is no path so EMPTY SET
is this case covered in the unit tests?

I answered:
currently the unit tests involve a subset of edges of the sample data, mainly edges 4 & 7
But, I will ask @vidhan13j07 to add edge 17, and make those as unit tests
because yes, the unit test also must consider when the graph has more than one component

@vidhan13j07
Copy link
Owner Author

vidhan13j07 commented Jun 7, 2017

@cvvergara, Should I create 16 more tests including edge id 17 in the edge set. I think you meant edge id 18 as it is a part of different component http://docs.pgrouting.org/2.2/en/doc/src/developer/sampledata.html

@cvvergara
Copy link

(using edges ids in my comment)
the graph you are using is G{4, 7} , so the set edges that you can not use are: {1,2,8,6,10} because those would belong to the same component
any other edge is going to be on a different component.
Remember you are not using the whole graph for this initial unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants