Skip to content

Commit ac83878

Browse files
ebyhrtdas
andauthored
Remove unused method from TestUtils (unitycatalog#582)
**PR Checklist** - [x] A description of the changes is added to the description of this PR. - [ ] If there is a related issue, make sure it is linked to this PR. - [ ] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** Remove unused method from TestUtils Signed-off-by: Yuya Ebihara <[email protected]> Co-authored-by: Tathagata Das <[email protected]>
1 parent 4823c23 commit ac83878

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

server/src/test/java/io/unitycatalog/server/utils/TestUtils.java

-28
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
import io.unitycatalog.server.base.ServerConfig;
55
import java.net.URI;
66
import java.util.HashMap;
7-
import java.util.Iterator;
87
import java.util.Map;
9-
import java.util.function.Function;
108

119
public class TestUtils {
1210
public static final String CATALOG_NAME = "uc_testcatalog";
@@ -54,32 +52,6 @@ public static int getRandomPort() {
5452
return (int) (Math.random() * 1000) + 9000;
5553
}
5654

57-
public static <T> int getSize(Iterable<T> iterable) {
58-
int size = 0;
59-
Iterator<T> iterator = iterable.iterator();
60-
while (iterator.hasNext()) {
61-
iterator.next();
62-
size++;
63-
}
64-
return size;
65-
}
66-
67-
public static <T> boolean contains(Iterable<T> iterable, T element, Function<T, Boolean> equals) {
68-
Iterator<T> iterator = iterable.iterator();
69-
while (iterator.hasNext()) {
70-
if (equals != null) {
71-
if (equals.apply(iterator.next())) {
72-
return true;
73-
}
74-
} else {
75-
if (iterator.next().equals(element)) {
76-
return true;
77-
}
78-
}
79-
}
80-
return false;
81-
}
82-
8355
public static ApiClient createApiClient(ServerConfig serverConfig) {
8456
ApiClient apiClient = new ApiClient();
8557
URI uri = URI.create(serverConfig.getServerUrl());

0 commit comments

Comments
 (0)