From c39f04ce3eeebd5c7c77c5a4f5295a2c78260328 Mon Sep 17 00:00:00 2001 From: Josh Eckels Date: Tue, 29 Aug 2023 10:29:12 -0700 Subject: [PATCH] Issue 48499: Use preferred SecurityPolicyManager.savePolicy() variant (#243) --- .../org/labkey/openldapsync/ldap/LdapSyncRunner.java | 2 +- .../sequenceanalysis/SequenceIntegrationTests.java | 2 +- .../sequenceanalysis/run/analysis/BamIterator.java | 2 +- cluster/src/org/labkey/cluster/pipeline/TestCase.java | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenLdapSync/src/org/labkey/openldapsync/ldap/LdapSyncRunner.java b/OpenLdapSync/src/org/labkey/openldapsync/ldap/LdapSyncRunner.java index 51b206773..77e692d87 100644 --- a/OpenLdapSync/src/org/labkey/openldapsync/ldap/LdapSyncRunner.java +++ b/OpenLdapSync/src/org/labkey/openldapsync/ldap/LdapSyncRunner.java @@ -893,7 +893,7 @@ public void doSetup() throws Exception Container project = ContainerManager.getForPath(PROJECT_NAME); if (project == null) { - project = ContainerManager.createContainer(ContainerManager.getRoot(), PROJECT_NAME); + project = ContainerManager.createContainer(ContainerManager.getRoot(), PROJECT_NAME, TestContext.get().getUser()); Set modules = new HashSet<>(); modules.addAll(project.getActiveModules()); modules.add(ModuleLoader.getInstance().getModule(OpenLdapSyncModule.NAME)); diff --git a/SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceIntegrationTests.java b/SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceIntegrationTests.java index a41c098bc..929edc204 100644 --- a/SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceIntegrationTests.java +++ b/SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceIntegrationTests.java @@ -244,7 +244,7 @@ protected static void doInitialSetUp(String projectName) throws Exception Container project = ContainerManager.getForPath(projectName); if (project == null) { - project = ContainerManager.createContainer(ContainerManager.getRoot(), projectName); + project = ContainerManager.createContainer(ContainerManager.getRoot(), projectName, TestContext.get().getUser()); //disable search so we dont get conflicts when deleting folder quickly ContainerManager.updateSearchable(project, false, TestContext.get().getUser()); diff --git a/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/BamIterator.java b/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/BamIterator.java index b60305b3f..1ea17a3f4 100644 --- a/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/BamIterator.java +++ b/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/BamIterator.java @@ -263,7 +263,7 @@ public static void before() throws Exception Container project = ContainerManager.getForPath(PROJECT_NAME); if (project == null) { - project = ContainerManager.createContainer(ContainerManager.getRoot(), PROJECT_NAME); + project = ContainerManager.createContainer(ContainerManager.getRoot(), PROJECT_NAME, TestContext.get().getUser()); Set modules = new HashSet<>(); modules.addAll(project.getActiveModules()); modules.add(ModuleLoader.getInstance().getModule(SequenceAnalysisModule.NAME)); diff --git a/cluster/src/org/labkey/cluster/pipeline/TestCase.java b/cluster/src/org/labkey/cluster/pipeline/TestCase.java index 905f44a43..18a701646 100644 --- a/cluster/src/org/labkey/cluster/pipeline/TestCase.java +++ b/cluster/src/org/labkey/cluster/pipeline/TestCase.java @@ -52,7 +52,7 @@ public static void initialSetUp() throws Exception Container project = ContainerManager.getForPath(PROJECT_NAME); if (project == null) { - project = ContainerManager.createContainer(ContainerManager.getRoot(), PROJECT_NAME); + project = ContainerManager.createContainer(ContainerManager.getRoot(), PROJECT_NAME, TestContext.get().getUser()); Set modules = new HashSet<>(); modules.addAll(project.getActiveModules()); modules.add(ModuleLoader.getInstance().getModule(ClusterModule.class)); @@ -102,19 +102,19 @@ protected static void doCleanup(String projectName) public void basicTest() throws Exception { Container c = ContainerManager.getForPath(PROJECT_NAME); - for (RemoteExecutionEngine engine : PipelineJobService.get().getRemoteExecutionEngines()) + for (RemoteExecutionEngine engine : PipelineJobService.get().getRemoteExecutionEngines()) { _log.info("testing engine: " + engine.getType()); - if (engine instanceof AbstractClusterExecutionEngine) + if (engine instanceof AbstractClusterExecutionEngine acee) { - runTestJob(c, TestContext.get().getUser(), (AbstractClusterExecutionEngine) engine); + runTestJob(c, TestContext.get().getUser(), acee); } } } public static class TestRunner implements ClusterService.ClusterRemoteTask { - public long _sleep = 0; + public long _sleep = 0l; public TestRunner(long sleep) {