Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix serialization with ApplicationRunnerServlet
Make the InvocationHandler used by the DeploymentConfiguration proxying feature serializable. Also make findDeploymentConfiguration static to avoid serializing an ApplicatinRunnerServlet instance. Change-Id: I360276ae42a875e9227df34e8aabf8ce2a697bc2
- Loading branch information
Showing
2 changed files
with
56 additions
and
30 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
25 changes: 16 additions & 9 deletions
25
uitest/src/com/vaadin/tests/components/ui/UISerializationTest.java
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,26 +1,33 @@ | |||
package com.vaadin.tests.components.ui; | package com.vaadin.tests.components.ui; | ||
|
|
||
import com.vaadin.testbench.elements.ButtonElement; | import static org.hamcrest.Matchers.allOf; | ||
import com.vaadin.tests.tb3.SingleBrowserTest; | import static org.hamcrest.Matchers.containsString; | ||
import org.junit.Ignore; | import static org.hamcrest.Matchers.endsWith; | ||
import static org.hamcrest.Matchers.startsWith; | |||
import static org.junit.Assert.assertThat; | |||
|
|||
import org.junit.Test; | import org.junit.Test; | ||
|
|
||
import static org.hamcrest.Matchers.*; | import com.vaadin.testbench.elements.ButtonElement; | ||
import static org.junit.Assert.assertThat; | import com.vaadin.tests.tb3.SingleBrowserTest; | ||
|
|
||
public class UISerializationTest extends SingleBrowserTest { | public class UISerializationTest extends SingleBrowserTest { | ||
|
|
||
@Test | @Test | ||
@Ignore | public void uiIsSerialized() throws Exception { | ||
// Broken on all browsers since 9696e6c3e7e952b66ac3f5c9ddc3dfca4233451e | |||
public void tb2test() throws Exception { | |||
openTestURL(); | openTestURL(); | ||
$(ButtonElement.class).first().click(); |
|
||
serialize(); | |||
|
|||
assertThat(getLogRow(0), startsWith("3. Diff states match, size: ")); | assertThat(getLogRow(0), startsWith("3. Diff states match, size: ")); | ||
assertThat(getLogRow(1), startsWith("2. Deserialized UI in ")); | assertThat(getLogRow(1), startsWith("2. Deserialized UI in ")); | ||
assertThat( | assertThat( | ||
getLogRow(2), | getLogRow(2), | ||
allOf(startsWith("1. Serialized UI in"), | allOf(startsWith("1. Serialized UI in"), | ||
containsString(" into "), endsWith(" bytes"))); | containsString(" into "), endsWith(" bytes"))); | ||
} | } | ||
|
|||
private void serialize() { | |||
$(ButtonElement.class).first().click(); | |||
} | |||
} | } |