Fix undefined sort order when applying parent data

The test case test_data_return currently has a race. It has a child
job with two parents returning the same variable back. Currently it
expects that there is a defined ordering in which the data is
forwarded to the child job which is currently not guaranteed.

Fix this by doing the apply correctly as stated in the docs in config
sorted order.

Change-Id: I884db97a8c9d61f4444a17093db57e7c1394df3b
2 files changed