Skip to content

Commit

Permalink
Check if setNativeLogLevel is called in setApplicationContext
Browse files Browse the repository at this point in the history
  • Loading branch information
mekya committed Nov 22, 2023
1 parent d368d39 commit d4aa181
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/antmedia/settings/ServerSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ else if (ILicenceService.LICENCE_TYPE_OFFLINE.equals(licenseService.getLicenseTy
offlineLicense = true;
}
}
setNativeLogLevel(LOG_LEVEL_ERROR);
setNativeLogLevel(nativeLogLevel);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ServerSettingsTest extends AbstractJUnit4SpringContextTests {

@Test
public void testNativeLogLevel() {

ServerSettings settings = new ServerSettings();

assertEquals(Logging.Severity.LS_WARNING, settings.getWebRTCLogLevel());
Expand Down Expand Up @@ -89,6 +90,8 @@ public void testSetAppContext()

assertEquals(ServerSettings.getLocalHostAddress(), settings.getHostAddress());

Mockito.verify(settings).setNativeLogLevel(settings.getNativeLogLevel());


Mockito.doReturn("").when(settings).getHostAddressFromEnvironment();
settings.setUseGlobalIp(true);
Expand All @@ -114,9 +117,7 @@ public void testSetAppContext()
settings.setApplicationContext(applicationContext);

assertTrue(settings.isOfflineLicense());




}

@Test
Expand Down

0 comments on commit d4aa181

Please sign in to comment.