Skip to content

Conversation

@TatuLund
Copy link
Contributor

@TatuLund TatuLund commented Nov 18, 2025

Fixes

java.io.NotSerializableException: com.vaadin.testbench.unit.BaseUIUnitTest$$Lambda$2828/0x0000755804ecbf70
	at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1187)
	at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1572)
	at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1529)
	at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1438)

Which is cased by

java.io.NotSerializableException: com.vaadin.testbench.unit.BaseUIUnitTest$$Lambda/0x00007414ec76b3a0
	- field (class "com.vaadin.testbench.unit.internal.MockVaadinKt$sam$com_vaadin_testbench_unit_internal_UIFactory$0", name: "function", type: "interface kotlin.jvm.functions.Function0")
	- object (class "com.vaadin.testbench.unit.internal.MockVaadinKt$sam$com_vaadin_testbench_unit_internal_UIFactory$0", com.vaadin.testbench.unit.internal.MockVaadinKt$sam$com_vaadin_testbench_unit_internal_UIFactory$0@672173b6)
	- field (class "com.vaadin.testbench.unit.internal.MockPage", name: "uiFactory", type: "interface com.vaadin.testbench.unit.internal.UIFactory")
	- object (class "com.vaadin.testbench.unit.internal.MockPage", com.vaadin.testbench.unit.internal.MockPage@2ce0f0b9)
	- field (class "com.vaadin.flow.component.UI", name: "page", type: "class com.vaadin.flow.component.page.Page")
	- object (class "com.vaadin.testbench.unit.mocks.MockedUI", com.vaadin.testbench.unit.mocks.MockedUI@6c7a9a0b)

Which again happens because not all methods in MockVaadin.kt has defined UIFactory as parameter, but some use () -> UI.

vaadin/kubernetes-kit#187

Removed VaadinSession from serialization test.
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Test Results

 18 files   -   149   18 suites   - 149   10s ⏱️ - 59m 58s
242 tests  -   909  241 ✅  -   904  0 💤  - 6  0 ❌ ±0  1 🔥 +1 
242 runs   - 1 360  241 ✅  - 1 352  0 💤  - 9  0 ❌ ±0  1 🔥 +1 

For more details on these errors, see this check.

Results for commit 336c9bd. ± Comparison against base commit b59357e.

This pull request removes 910 and adds 1 tests. Note that renamed tests count towards both.
AllTests ‑ Component.isTemplate does not fail without polymer templates dependency
com.vaadin.flow.component.accordion.AccordionTesterTest ‑ closedPanel_getPanelThrows
com.vaadin.flow.component.accordion.AccordionTesterTest ‑ getPanelBySummary_returnsCorrectPanel
com.vaadin.flow.component.accordion.AccordionTesterTest ‑ hasPanel_returnsTrueForExistingPanel
com.vaadin.flow.component.accordion.AccordionTesterTest ‑ isOpen_seesCorrectPanel
com.vaadin.flow.component.button.ButtonTesterTest ‑ buttonWithDisableOnClick_notUsableAfterClick
com.vaadin.flow.component.button.ButtonTesterTest ‑ clickWithMeta_metaKeysMarkedAsUsed
com.vaadin.flow.component.button.ButtonTesterTest ‑ clickWithMiddleButton_middleButtonClickShouldBeRegistered
com.vaadin.flow.component.button.ButtonTesterTest ‑ clickWithRightButton_rightButtonClickShouldBeRegistered
com.vaadin.flow.component.button.ButtonTesterTest ‑ normalClick_noMetaKeysMarkedAsUsed
…
com.vaadin.testbench.unit.ComponentTesterTest ‑ mockVaadinIsSerializable

♻️ This comment has been updated with latest results.

@TatuLund TatuLund changed the title fix: Implement Serializable in ComponentTester class fix: Fix serialization issues in creation of Vaadin mocks Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants