Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
change again for review
  • Loading branch information
flaming-archer committed Nov 25, 2024
commit d06041919fff829264f71f4468f04001dcbcdbbc
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Do NOT use it.
|true
|false

.2+|dnsjava.hostsfile.max_size
3+|Set the size of the hosts file to be loaded at a time,in bytes.
.2+|dnsjava.hostsfile.max_size_bytes
3+|Set the size of the hosts file to be loaded at a time, in bytes.
|Integer
|16384
|1000000
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/xbill/DNS/hosts/HostsFileParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ void testBigFileIsNotCompletelyCachedA() throws IOException {

@Test
void testBigFileCompletelyCachedA() throws IOException {
System.setProperty("dnsjava.hostsfile.max_size_bytes", 1024 * 1024 * 1024 + "");
HostsFileParser hostsFileParser = generateLargeHostsFile("testBigFileCompletelyCachedA");
try {
System.setProperty("dnsjava.hostsfile.max_size_bytes", 1024 * 1024 * 1024 + "");
HostsFileParser hostsFileParser = generateLargeHostsFile("testBigFileCompletelyCachedA");
hostsFileParser.getAddressForHost(Name.fromConstantString("localhost-10."), Type.A)
.orElseThrow(() -> new IllegalStateException("Host entry not found"));
assertEquals(1280, hostsFileParser.cacheSize());
Expand Down