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

fixed flaky test in testIncludeRelationsMultipleSame Test #462

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected DefaultResourceLookup newResourceLookup() {

@Override
public Set<Class<?>> getResourceRepositoryClasses() {
Set<Class<?>> set = new HashSet<>();
Set<Class<?>> set = new LinkedHashSet<>();
set.addAll(super.getResourceRepositoryClasses());
set.add(ScheduleRepositoryImpl.class); // not yet recognized by reflections for some reason
return set;
Expand All @@ -56,6 +56,6 @@ public Set<Class<?>> getResourceRepositoryClasses() {
}

protected static void addParams(Map<String, Set<String>> params, String key, String ... values ) {
params.put(key, new HashSet<String>(Arrays.asList(values)));
params.put(key, new LinkedHashSet<String>(Arrays.asList(values)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ public void testIncludeRelationsMultipleSame() throws InstantiationException, Il
QueryParams expectedParams = defaultQueryParamsWithOffset0(params);

QuerySpec inputSpec = new QuerySpec(Task.class);
inputSpec.includeRelation(Collections.singletonList("projects"));
inputSpec.includeRelation(Collections.singletonList("project"));
inputSpec.includeRelation(Collections.singletonList("projects"));

transitivityCheckTask(inputSpec, expectedParams);

Expand Down Expand Up @@ -447,4 +447,4 @@ private <T> Set<T> setParam(T... vars) {
Collections.addAll(set, vars);
return set;
}
}
}