Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7685c99
implement equals check tests and fix color equals check.
DivineThreepwood Feb 18, 2026
fb0e868
upgrade jul
DivineThreepwood Feb 18, 2026
3ad5f9f
fix addon commit message contains no addon name.
DivineThreepwood Feb 18, 2026
6b1726a
cleanup code and address revise
DivineThreepwood Mar 10, 2026
a76d46e
fix formatting
DivineThreepwood Mar 10, 2026
e4e71de
improve test performance
DivineThreepwood Mar 10, 2026
a84125a
Merge dev into bugfix/154-colorstate-comparison-fails-when-comparing-…
github-actions[bot] Mar 18, 2026
aa7e578
contiune on module test failure
DivineThreepwood Mar 18, 2026
df3c09f
avoid on each test fork
DivineThreepwood Mar 18, 2026
34ff0b1
patch jul with test container fixes
DivineThreepwood Mar 18, 2026
114452d
upgrade jul to 3.7.3
DivineThreepwood Mar 18, 2026
a55a8e6
cleanup
DivineThreepwood Mar 18, 2026
8baced0
improve auth test
DivineThreepwood Mar 18, 2026
5c61eff
improve message manager thread safety
DivineThreepwood Mar 18, 2026
572a1e9
update jule
DivineThreepwood Mar 18, 2026
9373aab
always shutdown message manager after each test.
DivineThreepwood Mar 29, 2026
fea60a2
patch jul
DivineThreepwood Mar 29, 2026
220c135
improve logging in RemoteAction
DivineThreepwood Mar 30, 2026
783a522
log action details in abstract bco test.
DivineThreepwood Mar 30, 2026
5a83be7
update jul
DivineThreepwood Mar 30, 2026
e64a143
improve scene test error logging.
DivineThreepwood Mar 30, 2026
0beec80
Merge dev into bugfix/154-colorstate-comparison-fails-when-comparing-…
github-actions[bot] Apr 6, 2026
841cb87
update jul
DivineThreepwood Apr 6, 2026
02ced83
upgrade jul to lastest
DivineThreepwood Apr 9, 2026
f96b0c7
Merge branch 'bugfix/154-colorstate-comparison-fails-when-comparing-w…
DivineThreepwood Apr 9, 2026
c259961
upgrade jul in gradle to latest version
DivineThreepwood Apr 9, 2026
0581c65
upgrade jul in gradle to latest version
DivineThreepwood Apr 9, 2026
7d9c02c
temporary disable all timeouts
DivineThreepwood Apr 9, 2026
f286ac3
further disable timeouts
DivineThreepwood Apr 9, 2026
90b2b3c
fix ci action and address requested changes of the review.
DivineThreepwood Apr 10, 2026
48d1e31
improve label and id performance by introducing caches.
DivineThreepwood Apr 11, 2026
d1c47d7
bump jul to latest
DivineThreepwood Apr 11, 2026
e837746
fix compile isue
DivineThreepwood Apr 11, 2026
7c3dcc3
Revert "further disable timeouts"
DivineThreepwood Apr 11, 2026
a3655f2
Revert "temporary disable all timeouts"
DivineThreepwood Apr 11, 2026
c779ab7
update jul
DivineThreepwood Apr 12, 2026
0cbffeb
splitt tests into one test job per module
DivineThreepwood Apr 12, 2026
7532ee9
decrease test timeouts
DivineThreepwood Apr 12, 2026
c6f07fc
fix test job declaration
DivineThreepwood Apr 12, 2026
874c129
fix unit registry deadlock were an unit config modification lead to a…
DivineThreepwood Apr 13, 2026
02e7dc0
increase ci critical timeouts
DivineThreepwood Apr 13, 2026
cb2084d
increase test timeout
DivineThreepwood Apr 13, 2026
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
182 changes: 168 additions & 14 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,66 @@ jobs:
path: "**/build/reports"


test:
name: "Test"
timeout-minutes: 120
test_registry_unit:
name: "Test Registry Unit"
needs: build
if: |
(github.event.pull_request.draft == false)
&& (needs.check.outputs.testing_needed == 'true')
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'

- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.registry.unit.test:check


test_registry_message:
name: "Test Registry Message"
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'

- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.registry.message.test:check


test_registry_class:
name: "Test Registry Class"
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4
Expand All @@ -118,16 +168,120 @@ jobs:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "prepare libs for tests"
- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "test backend"
run: ./gradlew --build-cache check
- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.registry.class.test:check

- name: Upload test reports
uses: actions/upload-artifact@v4
if: ${{ failure() || contains(github.event.pull_request.labels.*.name, 'force reports') }}

test_authentication:
name: "Test Authentication"
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
name: Test Reports
path: "**/build/reports"
distribution: 'temurin'
java-version: 21
cache: 'gradle'

- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.authentication.test:check


test_dal:
name: "Test DAL"
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'

- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.dal.test:check


test_app:
name: "Test App"
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'

- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.app.test:check


test_app_preset:
name: "Test App Preset"
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'

- name: Setup Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}

- name: "Prepare libs for tests"
run: ./prepare.sh

- name: "Run Tests"
run: ./gradlew --build-cache --continue --rerun-tasks :bco.app.preset:check
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
docker:
# if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'preview') }}
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'preview') }}
runs-on: ubuntu-latest
outputs:
bco-tags: ${{ steps.bco-meta.outputs.tags }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-addon-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
git config user.name "$GIT_USERNAME"
git config user.email "$GIT_EMAIL"
git add config.yaml
git commit -m "Update add-on $ADDONS_DIR version to $VERSION" || {
git commit -m "Update add-on $ADDON_DIR version to $VERSION" || {
echo "No changes to commit"
exit 0
}
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/org.openbase.bco.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ tasks.withType<Test> {
logging.captureStandardOutput(LogLevel.WARN)
maxHeapSize = "7G"
failFast = false
setForkEvery(1)
}

publishing {
Expand Down
2 changes: 1 addition & 1 deletion lib/jul
Submodule jul updated 18 files
+7 −7 .github/workflows/build-and-test.yml
+4 −3 .github/workflows/inspect-code.yml
+17 −7 .github/workflows/publish-jars.yml
+1 −1 gradle.properties
+86 −56 ...nication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableRemote.java
+19 −0 ...tion/controller/src/main/java/org/openbase/jul/communication/controller/AbstractIdentifiableController.java
+1 −1 ...cation/controller/src/test/java/org/openbase/jul/communication/controller/AbstractControllerServerTest.java
+1 −0 module/communication/mqtt/build.gradle.kts
+7 −1 module/communication/mqtt/src/main/java/org/openbase/jul/communication/mqtt/SharedMqttClient.kt
+17 −63 module/communication/mqtt/src/test/java/org/openbase/jul/communication/mqtt/AbstractIntegrationTest.kt
+0 −1 module/communication/mqtt/src/test/java/org/openbase/jul/communication/mqtt/IntegrationTest.kt
+0 −4 module/communication/mqtt/src/test/java/org/openbase/jul/communication/mqtt/SharedMqttClientTest.kt
+65 −0 module/communication/mqtttest/src/main/kotlin/org/openbase/jul/communication/mqtt/test/MqttBrokerManager.kt
+3 −58 module/communication/mqtttest/src/main/kotlin/org/openbase/jul/communication/mqtt/test/MqttIntegrationTest.kt
+1 −1 module/schedule/src/main/java/org/openbase/jul/schedule/AbstractSynchronizationFuture.java
+5 −3 module/storage/src/main/java/org/openbase/jul/storage/registry/FileSynchronizedRegistryImpl.java
+5 −1 module/storage/src/main/java/org/openbase/jul/storage/registry/ProtoBufFileSynchronizedRegistry.java
+422 −8 versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ public static void tearDownBCOApp() throws Throwable {
if (deviceManagerLauncher != null) {
deviceManagerLauncher.shutdown();
}
if (messageManagerLauncher != null) {
messageManagerLauncher.shutdown();
}
LOGGER.info("App tests finished!");
} catch (Throwable ex) {
throw ExceptionPrinter.printHistoryAndReturnThrowable(ex, LOGGER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@ object AuthenticationFutureList {
notificationCondition.await()
}
}

fun reset() {
synchronized(authenticatedFuturesLock) {
synchronized(incomingFuturesLock) {
incomingFutures.clear()
authenticatedFutures.clear()
}
}
}
}
4 changes: 0 additions & 4 deletions module/authentication/test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ plugins {
id("org.openbase.bco")
}

configurations {

}

dependencies {
api(project(":bco.authentication.core"))
api(project(":bco.authentication.lib"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class AuthenticationFutureListTest {
@Timeout(5)
@Test
fun testScheduledTask() {
AuthenticationFutureList.reset()
val lock = ReentrantLock()
val condition: Condition = lock.newCondition()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public abstract class AbstractUnitController<D extends AbstractMessage & Seriali
private final ArrayList<SchedulableAction> scheduledActionList;
private final Timeout scheduleTimeout;
private boolean infrastructure = false;
private String cachedId;
private String cachedLabel;

public AbstractUnitController(final DB builder) throws InstantiationException {
super(builder);
Expand Down Expand Up @@ -377,6 +379,10 @@ public UnitConfig applyConfigUpdate(final UnitConfig config) throws CouldNotPerf
logger.trace("Unit config change check failed because config is not available yet.");
}

// clear caches
cachedId = null;
cachedLabel = null;

try {
classDescription = getClass().getSimpleName() + "[" + config.getUnitType() + "[" + LabelProcessor.getBestMatch(config.getLabel()) + "]]";
} catch (NullPointerException | NotAvailableException ex) {
Expand Down Expand Up @@ -439,6 +445,9 @@ public UnitConfig applyConfigUpdate(final UnitConfig config) throws CouldNotPerf

@Override
public final String getId() throws NotAvailableException {
if (cachedId != null) {
return cachedId;
}
try {
UnitConfig tmpConfig = getConfig();
if (!tmpConfig.hasId()) {
Expand All @@ -449,14 +458,18 @@ public final String getId() throws NotAvailableException {
throw new InvalidStateException("unitconfig.id is empty");
}

return tmpConfig.getId();
cachedId = tmpConfig.getId();
return cachedId;
} catch (CouldNotPerformException ex) {
throw new NotAvailableException("Unit", "id", ex);
}
}

@Override
public String getLabel() throws NotAvailableException {
if (cachedLabel != null) {
return cachedLabel;
}
try {
UnitConfig tmpConfig = getConfig();
if (!tmpConfig.hasLabel()) {
Expand All @@ -466,7 +479,8 @@ public String getLabel() throws NotAvailableException {
if (LabelProcessor.isEmpty(tmpConfig.getLabel())) {
throw new InvalidStateException("unitconfig.label is empty");
}
return LabelProcessor.getBestMatch(getConfig().getLabel());
cachedLabel = LabelProcessor.getBestMatch(getConfig().getLabel());
return cachedLabel;
} catch (CouldNotPerformException ex) {
throw new NotAvailableException("Unit", "label", ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class MessageManager : Launchable<Void>, VoidInitializable {
fun removeOutdatedMessages(auth: AuthToken? = null) {
logger.trace("removeOutdatedMessages")
Registries.getMessageRegistry().userMessages
.toList()
.filterNot { message ->
message.conditionList.any { condition ->
Units.getUnit<Message>(condition.unitId, true).let { unit ->
Expand Down
Loading
Loading