-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade to java 17/kotlin 1.9.0 * upgrade gradle to 8.3 * replace embedded-consul with testcontainers * upgrade Spring Boot to 3.1.2 * change EchoContainer image to fix tests on arm * fix ports generation * replace deprecated WebSecurityConfigurerAdapter in ChaosController * move jackson module config to separate file * fix bad config test * remove deprecated configuration from SynchronizationConfig * update CHANGELOG.md * disable spring boot plugin while keeping dependency management * separate workflow for flaky tests * do not free generated ports * update docker files * fix security configuration
- Loading branch information
Showing
45 changed files
with
505 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Flaky tests | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
paths-ignore: | ||
- 'readme.md' | ||
|
||
jobs: | ||
flaky_test: | ||
name: flaky_test | ||
runs-on: ubuntu-latest | ||
env: | ||
GRADLE_OPTS: '-Dfile.encoding=utf-8 -Dorg.gradle.daemon=false' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
|
||
- uses: gradle/wrapper-validation-action@v1 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Flaky tests | ||
run: ./gradlew clean -Penvironment=integration :envoy-control-tests:flakyTest | ||
|
||
- name: Junit report | ||
uses: mikepenz/action-junit-report@v2 | ||
if: always() | ||
with: | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
|
||
- name: Cleanup Gradle Cache | ||
run: | | ||
rm -f ~/.gradle/caches/modules-2/modules-2.lock | ||
rm -f ~/.gradle/caches/modules-2/gc.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/Ports.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package pl.allegro.tech.servicemesh.envoycontrol.utils | ||
|
||
import java.net.ServerSocket | ||
import pl.allegro.tech.servicemesh.envoycontrol.logger | ||
|
||
object Ports { | ||
private val usedPorts: MutableSet<Int> = mutableSetOf() | ||
val logger by logger() | ||
|
||
@Synchronized | ||
fun nextAvailable(): Int { | ||
var randomPort: Int | ||
do { | ||
randomPort = ServerSocket(0).use { it.localPort } | ||
} while (usedPorts.contains(randomPort)) | ||
usedPorts.add(randomPort) | ||
logger.info("Generated port: {}", randomPort) | ||
logger.info("Used ports: {}", usedPorts) | ||
|
||
return randomPort | ||
} | ||
} |
Oops, something went wrong.