Skip to content

Commit

Permalink
chore(engine): bump spring dependency to version 6
Browse files Browse the repository at this point in the history
related to #4869
  • Loading branch information
tasso94 committed Jan 2, 2025
1 parent 586037c commit 8c741e1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 100 deletions.
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

0 comments on commit 8c741e1

Please sign in to comment.