Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(engine): bump spring-beans to 6 #4862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${version.spring.framework}</version>
<version>${version.spring.framework6}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -333,6 +333,13 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.github.h-thurow</groupId>
<artifactId>simple-jndi</artifactId>
<version>0.24.0</version>
<scope>test</scope>
</dependency>
</dependencies>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
import java.net.URLDecoder;

import org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep;
import org.junit.Rule;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.jndi.SimpleNamingContext;

/**
* Checks the correct retrieval of bpm-platform.xml file through JNDI,
Expand All @@ -63,8 +63,19 @@ public class BpmPlatformXmlLocationTest {
private static final String BPM_PLATFORM_XML_LOCATION_URL_HTTP_PROTOCOL = "http://localhost:8080/camunda/" + BPM_PLATFORM_XML_FILE;
private static final String BPM_PLATFORM_XML_LOCATION_URL_HTTPS_PROTOCOL = "https://localhost:8080/camunda/" + BPM_PLATFORM_XML_FILE;

@Rule
public MockInitialContextRule initialContextRule = new MockInitialContextRule(new SimpleNamingContext());
protected Context context;

@Before
public void setUp() throws NamingException {
context = new InitialContext();
}

@After
public void close() throws NamingException {
if (context != null) {
context.close();
}
}

@Test
public void checkValidBpmPlatformXmlResourceLocationForUrl() throws NamingException, MalformedURLException {
Expand Down Expand Up @@ -121,7 +132,6 @@ public void checkValidBpmPlatformXmlResourceLocation() throws NamingException, M

@Test
public void getBpmPlatformXmlLocationFromJndi() throws NamingException, MalformedURLException {
Context context = new InitialContext();
context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);

URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlLocationFromJndi();
Expand Down Expand Up @@ -184,7 +194,6 @@ public void getBpmPlatformXmlFromCatalinaConfDirectory() throws MalformedURLExce

@Test
public void lookupBpmPlatformXml() throws NamingException, MalformedURLException {
Context context = new InitialContext();
context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);

URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXml();
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void testBatchWindowXmlConfigParsingException() throws ParseException {
.createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/history/history-cleanup-batch-window-map-wrong-values.camunda.cfg.xml")
.buildProcessEngine())
.isInstanceOf(Exception.class)
.hasMessageContaining("startTime");
.hasMessageContaining("Error creating bean with name 'processEngineConfiguration'");
}

@Test
Expand Down
2 changes: 2 additions & 0 deletions engine/src/test/resources/jndi.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
java.naming.factory.initial=org.osjava.sj.SimpleContextFactory
org.osjava.sj.jndi.shared=true
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
import org.camunda.bpm.webapp.impl.security.auth.Authentication;
import org.camunda.bpm.webapp.impl.security.filter.RequestMatcher.Match;
import org.camunda.bpm.webapp.impl.security.filter.util.FilterRules;
import org.springframework.util.PathMatcher;

/**
* <p>A {@link SecurityFilterRule} that deleagates to a set of {@link PathMatcher}s</p>
* <p>A {@link SecurityFilterRule} that delegates to a set of path matchers</p>
*
* <p>How this thing works:
* <ul>
Expand Down
Loading