Skip to content

Commit

Permalink
Improved a single world table test
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraLS3 committed Apr 7, 2018
1 parent 1e993ed commit 181dae6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,6 @@ public Set<String> processResults(ResultSet set) throws SQLException {
});
}

private Map<Integer, Integer> getWorldIDServerIDRelation() throws SQLException {
String sql = "SELECT " +
Col.ID + ", " +
Col.SERVER_ID +
" FROM " + tableName;
return query(new QueryAllStatement<Map<Integer, Integer>>(sql, 100) {
@Override
public Map<Integer, Integer> processResults(ResultSet set) throws SQLException {
HashMap<Integer, Integer> idServerIdMap = new HashMap<>();
while (set.next()) {
idServerIdMap.put(set.getInt(Col.ID.get()), set.getInt(Col.SERVER_ID.get()));
}
return idServerIdMap;
}
});
}

public void alterTableV16() throws SQLException {
addColumns(Col.SERVER_ID + " integer NOT NULL DEFAULT 0");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,9 @@ public void testRegister() throws DBException {

@Test
public void testWorldTableGetWorldNamesNoException() throws SQLException {
saveAllData(db);
Set<String> worldNames = db.getWorldTable().getWorldNames(TestConstants.SERVER_UUID);
assertEquals(new HashSet<>(worlds), worldNames);
}

@Test
Expand Down

0 comments on commit 181dae6

Please sign in to comment.