Skip to content

Commit d86fa89

Browse files
committed
minor tweaks, dependency update fix, add integration test script
1 parent 52db319 commit d86fa89

File tree

13 files changed

+79
-28
lines changed

13 files changed

+79
-28
lines changed

lib/fetch.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ fetch() {
4242

4343
fetch_maven_deps \
4444
'org.apache.httpcomponents:httpclient:4.5.12' \
45+
'commons-cli:commons-cli:1.4' \
4546
'junit:junit:4.12' \
4647
'org.slf4j:slf4j-log4j12:1.7.7' \
4748
'org.jsoup:jsoup:1.11.3'
4849

4950
curl -sL https://github.com/drm/java-redis-client/releases/download/v2.1.0/java-redis-client-v2.1.0--javac-11.0.9.1.jar -o ./java-redis-client-v2.1.0.jar
50-
curl -sL https://github.com/drm/java-redis-collections/releases/download/v1.1.0/java-redis-collections-v1.1.0--javac-11.0.9.1.jar -o ./java-redis-collections-v1.1.0.jar
51+
curl -sL https://github.com/drm/java-redis-collections/releases/download/v1.1.1/java-redis-collections-v1.1.1--javac-11.0.9.1.jar -o ./java-redis-collections-v1.1.1.jar
5152
}
5253

5354
clean() {
-41.6 KB
Binary file not shown.

log4j.debugging.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ log4j.appender.fileName.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
1414

1515
### By default everything that is of warning or severity WARN, ERROR or FATAL is logged both to
1616
### the console and to the log fileName.
17-
log4j.rootLogger=trace, stdout, fileName
17+
log4j.rootLogger=info, stdout, fileName
1818

19-
log4j.logger.nl.melp.linkchecker=trace
19+
# log4j.logger.nl.melp.linkchecker=trace
2020

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo!
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<p>Hi, welcome to this site. All broken links were removed:</p>
3+
<p><a href="/foo.html">Foo does exist now</a></p>
4+
<p><a href="https://example.org/">Does-exist domain</a></p>
5+
<p>Invalid host</p>
6+
<p>Has no valid protocol</p>
7+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<p>Hi, welcome to this site. This page contains a few broken links:</p>
3+
<p><a href="/foo.html">Foo does not exist</a></p>
4+
<p><a href="https://thisisaninvaliddomainthatshouldnotresultinanythingsensible000.com">Non-existent domain</a></p>
5+
<p><a href="https://invalid_host/baz">Invalid host</a></p>
6+
<p><a href="unknown:protocol">Has no valid protocol</a></p>
7+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<p>Hi, welcome to this site. All broken links were removed:</p>
3+
<p><a href="/foo.html">Foo does exist now</a></p>
4+
<p><a href="https://example.org/">Does-exist domain</a></p>
5+
<p>Invalid host</p>
6+
<p>Has no valid protocol</p>
7+
</html>

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
./build.sh
1+
#./build.sh
22

33
java \
44
-Xmx512M \

src/nl/melp/linkchecker/LogMonitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public void log() {
3030

3131
logger.info(
3232
String.format(
33-
"processed: %d, processing: %d, to check: %d; (run time %ds, avg %d/s, mem usage: %d MB of %d MB (%.2f%%))",
34-
size,
33+
"[%.1f%%] (%d of %d remaining); (run time %ds, avg %d/s, mem usage: %d MB of %d MB (%.2f%%))",
34+
((float)size / status.numQueueud()) * 100,
3535
status.numPending(),
3636
status.numQueueud(),
3737
dt,

src/nl/melp/linkchecker/RunConfig.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
import nl.melp.redis.Redis;
44
import nl.melp.redis.collections.ISerializer;
55
import nl.melp.redis.collections.SerializedHashMap;
6-
import nl.melp.redis.collections.SerializedMappedSet;
7-
import nl.melp.redis.collections.SerializedSortedSet;
8-
import nl.melp.redis.collections.Serializer;
9-
import nl.melp.redis.collections.Serializer.StringSerializer;
106
import nl.melp.redis.collections.Serializers;
11-
import org.apache.http.HttpEntity;
127
import org.apache.http.config.RegistryBuilder;
138
import org.apache.http.conn.socket.ConnectionSocketFactory;
149
import org.apache.http.conn.socket.PlainConnectionSocketFactory;

0 commit comments

Comments
 (0)