Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 1 | #include "elog_errorwrap_test.hpp" |
| 2 | |
| 3 | namespace phosphor |
| 4 | { |
| 5 | namespace logging |
| 6 | { |
| 7 | namespace internal |
| 8 | { |
| 9 | |
| 10 | TEST_F(TestLogManager, logCap) |
| 11 | { |
Patrick Williams | ce0bdf1 | 2021-04-16 20:09:22 -0500 | [diff] [blame] | 12 | for (size_t i = 0; i < ERROR_INFO_CAP + 20; i++) |
Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 13 | { |
| 14 | manager.commitWithLvl(i, "FOO", 6); |
| 15 | } |
| 16 | |
| 17 | // Max num of Info( and below Sev) errors can be created is qual to |
| 18 | // ERROR_INFO_CAP |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame] | 19 | EXPECT_EQ(ERROR_INFO_CAP, manager.getInfoErrSize()); |
Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 20 | |
Patrick Williams | ce0bdf1 | 2021-04-16 20:09:22 -0500 | [diff] [blame] | 21 | for (size_t i = 0; i < ERROR_CAP + 20; i++) |
Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 22 | { |
| 23 | manager.commitWithLvl(i, "FOO", 0); |
| 24 | } |
| 25 | // Max num of high severity errors can be created is qual to ERROR_CAP |
| 26 | EXPECT_EQ(ERROR_CAP, manager.getRealErrSize()); |
Nagaraju Goruganti | 477b731 | 2018-06-25 23:28:58 -0500 | [diff] [blame] | 27 | } |
| 28 | |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame] | 29 | } // namespace internal |
| 30 | } // namespace logging |
| 31 | } // namespace phosphor |