Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Aug 27, 2024
1 parent cfa03cd commit 02c0185
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ public List<? extends PlainSchema> findByAnyTypeClasses(final Collection<AnyType
@Override
public <T extends PlainAttr<?>> boolean hasAttrs(final PlainSchema schema, final Class<T> reference) {
String label;
if (reference.isAssignableFrom(GPlainAttr.class)) {
if (GPlainAttr.class.isAssignableFrom(reference)) {
label = Neo4jGroup.NODE;
} else if (reference.isAssignableFrom(APlainAttr.class)) {
} else if (APlainAttr.class.isAssignableFrom(reference)) {
label = Neo4jAnyObject.NODE;
} else if (reference.isAssignableFrom(LAPlainAttr.class)) {
} else if (LAPlainAttr.class.isAssignableFrom(reference)) {
label = Neo4jLinkedAccount.NODE;
} else {
label = Neo4jUser.NODE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,14 @@ public void issueSYNCOPE1419() {
assertNotNull(rossini);
assertEquals("2009-05-26", rossini.getPlainAttr("loginDate").orElseThrow().getValues().get(0));

if (IS_EXT_SEARCH_ENABLED) {
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
// ignore
}
}

PagedResult<UserTO> total = USER_SERVICE.search(
new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).page(1).size(1).build());

Expand Down Expand Up @@ -1028,14 +1036,14 @@ void issueSYNCOPE1826() {
// ignore
}
}

try {
assertFalse(USER_SERVICE.search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).details(false)
.fiql(SyncopeClient.getUserSearchConditionBuilder().is("username")
.equalToIgnoreCase("user test 1826").query()).build()).getResult().isEmpty());
assertFalse(ANY_OBJECT_SERVICE.search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM)
.details(false).fiql(SyncopeClient.getAnyObjectSearchConditionBuilder(PRINTER).is("name")
.equalToIgnoreCase("obj test 1826").query()).build()).getResult().isEmpty());
.equalToIgnoreCase("obj test 1826").query()).build()).getResult().isEmpty());
assertFalse(USER_SERVICE.search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).details(false)
.fiql(SyncopeClient.getUserSearchConditionBuilder().is("username")
.equalToIgnoreCase("user 1826 test").query()).build()).getResult().isEmpty());
Expand All @@ -1049,5 +1057,5 @@ void issueSYNCOPE1826() {
deleteUser("user test 182");
}
}

}

0 comments on commit 02c0185

Please sign in to comment.