Skip to content

Commit 9a9aab3

Browse files
authored
Merge pull request #145 from xdev-software/develop
Release
2 parents 4031445 + eeade51 commit 9a9aab3

File tree

6 files changed

+48
-34
lines changed

6 files changed

+48
-34
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ body:
3333
validations:
3434
required: true
3535

36+
- type: textarea
37+
id: description
38+
attributes:
39+
label: Description of the problem
40+
description: |
41+
Describe as exactly as possible what is not working.
42+
validations:
43+
required: true
44+
3645
- type: textarea
3746
id: steps-to-reproduce
3847
attributes:
@@ -47,20 +56,6 @@ body:
4756
validations:
4857
required: true
4958

50-
- type: textarea
51-
id: expected-behavior
52-
attributes:
53-
label: Expected behavior
54-
description: |
55-
Tell us what you expect to happen.
56-
57-
- type: textarea
58-
id: actual-behavior
59-
attributes:
60-
label: Actual behavior
61-
description: |
62-
Tell us what happens with the steps given above.
63-
6459
- type: textarea
6560
id: additional-information
6661
attributes:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.2.2
2+
* [Browser] Improve SHM configuration
3+
14
# 1.2.1
25
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
36
* Updated dependencies

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>10.23.1</version>
48+
<version>10.25.0</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -82,12 +82,12 @@
8282
<dependency>
8383
<groupId>net.sourceforge.pmd</groupId>
8484
<artifactId>pmd-core</artifactId>
85-
<version>7.13.0</version>
85+
<version>7.14.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>net.sourceforge.pmd</groupId>
8989
<artifactId>pmd-java</artifactId>
90-
<version>7.13.0</version>
90+
<version>7.14.0</version>
9191
</dependency>
9292
</dependencies>
9393
</plugin>

testcontainers-selenium-demo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<dependency>
3535
<groupId>org.seleniumhq.selenium</groupId>
3636
<artifactId>selenium-dependencies-bom</artifactId>
37-
<version>4.32.0</version>
37+
<version>4.33.0</version>
3838
<type>pom</type>
3939
<scope>import</scope>
4040
</dependency>

testcontainers-selenium/pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>org.testcontainers</groupId>
5858
<artifactId>testcontainers</artifactId>
59-
<version>1.21.0</version>
59+
<version>1.21.1</version>
6060
<exclusions>
6161
<!-- No JUnit 4 -->
6262
<exclusion>
@@ -68,7 +68,7 @@
6868
<dependency>
6969
<groupId>software.xdev</groupId>
7070
<artifactId>testcontainers-junit4-mock</artifactId>
71-
<version>1.0.1</version>
71+
<version>1.0.2</version>
7272
</dependency>
7373

7474
<!-- Testcontainers is using outdated v1 -->
@@ -82,15 +82,15 @@
8282
<dependency>
8383
<groupId>org.seleniumhq.selenium</groupId>
8484
<artifactId>selenium-api</artifactId>
85-
<version>4.32.0</version>
85+
<version>4.33.0</version>
8686
<scope>provided</scope>
8787
</dependency>
8888

8989
<!-- Tests -->
9090
<dependency>
9191
<groupId>org.junit.jupiter</groupId>
9292
<artifactId>junit-jupiter</artifactId>
93-
<version>5.12.2</version>
93+
<version>5.13.0</version>
9494
<scope>test</scope>
9595
</dependency>
9696
<dependency>
@@ -102,7 +102,7 @@
102102
<dependency>
103103
<groupId>org.seleniumhq.selenium</groupId>
104104
<artifactId>selenium-remote-driver</artifactId>
105-
<version>4.32.0</version>
105+
<version>4.33.0</version>
106106
<scope>test</scope>
107107
<exclusions>
108108
<!-- Tracing is not needed -->
@@ -120,13 +120,13 @@
120120
<dependency>
121121
<groupId>org.seleniumhq.selenium</groupId>
122122
<artifactId>selenium-support</artifactId>
123-
<version>4.32.0</version>
123+
<version>4.33.0</version>
124124
<scope>test</scope>
125125
</dependency>
126126
<dependency>
127127
<groupId>org.seleniumhq.selenium</groupId>
128128
<artifactId>selenium-firefox-driver</artifactId>
129-
<version>4.32.0</version>
129+
<version>4.33.0</version>
130130
<scope>test</scope>
131131
<exclusions>
132132
<!-- No unused, beta-grade, RUST blobs -->
@@ -139,7 +139,7 @@
139139
<dependency>
140140
<groupId>org.seleniumhq.selenium</groupId>
141141
<artifactId>selenium-chrome-driver</artifactId>
142-
<version>4.32.0</version>
142+
<version>4.33.0</version>
143143
<scope>test</scope>
144144
<exclusions>
145145
<!-- No unused, beta-grade, RUST blobs -->
@@ -326,7 +326,7 @@
326326
<dependency>
327327
<groupId>com.puppycrawl.tools</groupId>
328328
<artifactId>checkstyle</artifactId>
329-
<version>10.23.1</version>
329+
<version>10.25.0</version>
330330
</dependency>
331331
</dependencies>
332332
<configuration>
@@ -363,12 +363,12 @@
363363
<dependency>
364364
<groupId>net.sourceforge.pmd</groupId>
365365
<artifactId>pmd-core</artifactId>
366-
<version>7.13.0</version>
366+
<version>7.14.0</version>
367367
</dependency>
368368
<dependency>
369369
<groupId>net.sourceforge.pmd</groupId>
370370
<artifactId>pmd-java</artifactId>
371-
<version>7.13.0</version>
371+
<version>7.14.0</version>
372372
</dependency>
373373
</dependencies>
374374
</plugin>

testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/browser/BrowserWebDriverContainer.java

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ public class BrowserWebDriverContainer<SELF extends BrowserWebDriverContainer<SE
8989

9090
protected static final String TC_TEMP_DIR_PREFIX = "tc";
9191

92+
protected static Boolean currentOsWindows; // You should use the method instead, this might be NULL
93+
9294
protected boolean mapTimezoneIntoContainer = true;
9395

9496
protected boolean validateImageEnabled = true;
@@ -280,19 +282,33 @@ protected void configureShm()
280282
{
281283
if(this.getShmSize() == null)
282284
{
283-
if(Optional.ofNullable(System.getProperty("os.name"))
284-
.map(osName -> osName.startsWith("Windows"))
285-
.orElse(false))
285+
if(this.shouldDirectMountShm())
286286
{
287-
this.withSharedMemorySize(512 * FileUtils.ONE_MB);
287+
this.getBinds().add(new Bind("/dev/shm", new Volume("/dev/shm"), AccessMode.rw));
288288
}
289289
else
290290
{
291-
this.getBinds().add(new Bind("/dev/shm", new Volume("/dev/shm"), AccessMode.rw));
291+
this.withSharedMemorySize(512 * FileUtils.ONE_MB);
292292
}
293293
}
294294
}
295295

296+
protected boolean shouldDirectMountShm()
297+
{
298+
return !isCurrentOsWindows();
299+
}
300+
301+
protected static boolean isCurrentOsWindows()
302+
{
303+
if(currentOsWindows == null)
304+
{
305+
currentOsWindows = Optional.ofNullable(System.getProperty("os.name"))
306+
.map(osName -> osName.startsWith("Windows"))
307+
.orElse(false);
308+
}
309+
return !currentOsWindows;
310+
}
311+
296312
protected void configureVNC()
297313
{
298314
if(this.disableVNC)

0 commit comments

Comments
 (0)