Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef82719

Browse files
committed
Fix memory comparison in ProcessInfoTests
Closesgh-43926
1 parent1e35a0b commitef82719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎spring-boot-project/spring-boot/src/test/java/org/springframework/boot/info/ProcessInfoTests.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,13 +43,13 @@ void processInfoIsAvailable() {
4343
voidmemoryInfoIsAvailable() {
4444
ProcessInfoprocessInfo =newProcessInfo();
4545
MemoryUsageInfoheapUsageInfo =processInfo.getMemory().getHeap();
46-
MemoryUsageInfononHeapUsageInfo =processInfo.getMemory().getNonHeap();
4746
assertThat(heapUsageInfo.getInit()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getMax());
4847
assertThat(heapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getCommitted());
4948
assertThat(heapUsageInfo.getCommitted()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getMax());
5049
assertThat(heapUsageInfo.getMax()).isPositive();
50+
MemoryUsageInfononHeapUsageInfo =processInfo.getMemory().getNonHeap();
5151
assertThat(nonHeapUsageInfo.getInit()).isPositive();
52-
assertThat(nonHeapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getCommitted());
52+
assertThat(nonHeapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(nonHeapUsageInfo.getCommitted());
5353
assertThat(nonHeapUsageInfo.getCommitted()).isPositive();
5454
assertThat(nonHeapUsageInfo.getMax()).isEqualTo(-1);
5555
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp