Skip to content

Commit

Permalink
#3407 .debug instead of .info
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 3, 2024
1 parent 1a1eb6b commit cc5387c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions eo-runtime/src/test/java/EOorg/EOeolang/EOnet/EOsocketTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void acceptsConnectionOnSocket() throws InterruptedException, UnknownHostExcepti
final int accepted = Winsock.INSTANCE.accept(
socket, addr, new IntByReference(addr.size())
);
Logger.info(this, "Accepted socket: %d", accepted);
Logger.debug(this, "Accepted socket: %d", accepted);
accept.set(accepted);
if (accepted < 0) {
error.set(this.getError());
Expand Down Expand Up @@ -366,7 +366,7 @@ void sendsAndReceivesMessagesViaSyscalls()
accepted = Winsock.INSTANCE.accept(
socket, addr, new IntByReference(addr.size())
);
Logger.info(this, "Accepted socket: %d", accepted);
Logger.debug(this, "Accepted socket: %d", accepted);
this.ensure(accepted > 0);
final byte[] buf = new byte[1024];
received.set(Winsock.INSTANCE.recv(accepted, buf, buf.length, 0));
Expand Down Expand Up @@ -428,7 +428,7 @@ private int openSocket() {
Winsock.SOCK_STREAM,
Winsock.IPPROTO_TCP
);
Logger.info(this, "Opened socket: %d", socket);
Logger.debug(this, "Opened socket: %d", socket);
return socket;
}

Expand All @@ -440,9 +440,9 @@ private int openSocket() {
private int closeSocket(final int socket) {
final int closed = Winsock.INSTANCE.closesocket(socket);
if (closed == 0) {
Logger.info(this, "Closed socket: %d", socket);
Logger.debug(this, "Closed socket: %d", socket);
} else {
Logger.info(this, "Failed to close socket: %d", socket);
Logger.debug(this, "Failed to close socket: %d", socket);
}
return closed;
}
Expand Down Expand Up @@ -471,7 +471,7 @@ private int cleanup() {
*/
private void ensure(final boolean condition) {
if (!condition) {
Logger.info(this, "Error code: %d", this.getError());
Logger.debug(this, "Error code: %d", this.getError());
}
assert condition;
}
Expand Down Expand Up @@ -625,7 +625,7 @@ void acceptsConnectionOnSocket() throws InterruptedException {
final int accepted = CStdLib.INSTANCE.accept(
socket, addr, new IntByReference(addr.size())
);
Logger.info(this, "Accepted socket: %d", accepted);
Logger.debug(this, "Accepted socket: %d", accepted);
accept.set(accepted);
if (accepted < 0) {
error.set(this.getError());
Expand Down Expand Up @@ -685,7 +685,7 @@ void sendsAndReceivesMessagesViaSyscalls() throws InterruptedException {
accepted = CStdLib.INSTANCE.accept(
socket, addr, new IntByReference(addr.size())
);
Logger.info(this, "Accepted socket: %d", accepted);
Logger.debug(this, "Accepted socket: %d", accepted);
this.ensure(accepted > 0);
final byte[] buf = new byte[1024];
received.set(CStdLib.INSTANCE.recv(accepted, buf, buf.length, 0));
Expand Down Expand Up @@ -738,7 +738,7 @@ socket, addr, new IntByReference(addr.size())
*/
private void ensure(final boolean condition) {
if (!condition) {
Logger.info(this, "Strerror: %s", this.getError());
Logger.debug(this, "Strerror: %s", this.getError());
}
assert condition;
}
Expand All @@ -753,7 +753,7 @@ private int openSocket() {
CStdLib.SOCK_STREAM,
CStdLib.IPPROTO_TCP
);
Logger.info(this, "Opened socket: %d", sock);
Logger.debug(this, "Opened socket: %d", sock);
return sock;
}

Expand All @@ -765,9 +765,9 @@ private int openSocket() {
private int closeSocket(final int socket) {
final int closed = CStdLib.INSTANCE.close(socket);
if (closed == 0) {
Logger.info(this, "Closed socket: %d", socket);
Logger.debug(this, "Closed socket: %d", socket);
} else {
Logger.info(this, "Failed to close socket: %d", socket);
Logger.debug(this, "Failed to close socket: %d", socket);
}
return closed;
}
Expand Down Expand Up @@ -845,9 +845,9 @@ RandomServer started() {
this.socket.setReuseAddress(true);
this.socket.bind(new InetSocketAddress(EOsocketTest.LOCALHOST, this.port));
bound = true;
Logger.info(this, "Server started on port %d", this.port);
Logger.debug(this, "Server started on port %d", this.port);
} catch (final IOException exception) {
Logger.info(this, "Port %d is unavailable, trying another port...", this.port);
Logger.debug(this, "Port %d is unavailable, trying another port...", this.port);
}
}
return this;
Expand Down

0 comments on commit cc5387c

Please sign in to comment.