Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/org/labkey/test/pages/core/admin/ShowAdminPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ public void clickCredits()
clickAndWait(elementCache().creditsLink);
}

public void clickViewPrimarySiteLogFile()
{
goToSettingsSection();
clickAndWait(elementCache().viewPrimarySiteLogFileLink);
}

public void clickPostgresActivity()
{
goToSettingsSection();
Expand Down Expand Up @@ -296,6 +302,7 @@ protected class ElementCache extends LabKeyPage.ElementCache
protected WebElement systemPropertiesLink = Locator.linkContainingText("system properties").findWhenNeeded(this);
protected WebElement viewsAndScriptingLink = Locator.linkWithText("views and scripting").findWhenNeeded(this);
protected WebElement creditsLink = Locator.linkWithText("credits").findWhenNeeded(this);
protected WebElement viewPrimarySiteLogFileLink = Locator.linkWithText("view primary site log file").findWhenNeeded(this);

protected WebElement postgresActivityLink = Locator.linkWithText("postgres activity").findWhenNeeded(this);
protected WebElement postgresLocksLink = Locator.linkWithText("postgres locks").findWhenNeeded(this);
Expand Down
16 changes: 16 additions & 0 deletions src/org/labkey/test/tests/BasicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.labkey.test.categories.Git;
import org.labkey.test.categories.Hosting;
import org.labkey.test.categories.Smoke;
import org.labkey.test.pages.core.admin.ShowAdminPage;
import org.labkey.test.util.Order;

import java.util.List;
Expand Down Expand Up @@ -61,6 +62,21 @@ public void testScripts()
assertTextNotPresent("WARNING:");
}

@Test
public void testStartupLogging()
{
ShowAdminPage adminPage = goToAdminConsole();
adminPage.clickViewPrimarySiteLogFile();

// Issue 52684: Ensure Log4J is capturing startup logging from:
assertTextPresent(
"Starting LabKeyServer using", // Our "embedded" code (the primary entry point)
"Starting Servlet engine", // Spring Boot and Tomcat
"Exploding module archives", // Our "bootstrap" code (extracts modules and sets up webapp classloading)
"LabKey-managed modules to ensure they're recent enough to upgrade" // Our code inside the webapp
);
}

@Override
public List<String> getAssociatedModules()
{
Expand Down
16 changes: 16 additions & 0 deletions src/org/labkey/test/tests/TriggerScriptTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.labkey.test.WebTestHelper;
import org.labkey.test.categories.Daily;
import org.labkey.test.categories.Data;
import org.labkey.test.components.html.SiteNavBar;
import org.labkey.test.pages.ImportDataPage;
import org.labkey.test.params.FieldDefinition;
import org.labkey.test.params.FieldDefinition.ColumnType;
Expand Down Expand Up @@ -448,7 +449,22 @@ public void testDataClassIndividualTriggers() throws Exception
GoToDataUI goToDataClass = () -> goTo("Data Classes", DATA_CLASSES_NAME);

setupDataClass();

// Go to the log view to start capturing messages
new SiteNavBar(getDriver()).clickAdminMenuItem(false, "Developer Links", "Server JavaScript Console");
switchToWindow(1);
waitForText("Message");

switchToMainWindow();
doIndividualTriggerTest("query", goToDataClass, "Name", false, "Yes, Delete", false);

// Go back to the console window
switchToWindow(1);
waitForText("init got triggered with event: delete",
"exp.data: this is from the shared function",
"complete got triggered with event: delete");
getDriver().close();
switchToMainWindow();
}


Expand Down