|
1 | | -import kotlinx.coroutines.Dispatchers |
2 | | -import kotlinx.coroutines.launch |
3 | | -import kotlinx.coroutines.withContext |
4 | | -import kotlinx.coroutines.withTimeoutOrNull |
5 | | -import org.hildan.chrome.devtools.domains.accessibility.AXProperty |
6 | | -import org.hildan.chrome.devtools.domains.accessibility.AXPropertyName |
| 1 | +import kotlinx.coroutines.* |
| 2 | +import org.hildan.chrome.devtools.* |
| 3 | +import org.hildan.chrome.devtools.domains.accessibility.* |
7 | 4 | import org.hildan.chrome.devtools.domains.dom.* |
8 | | -import org.hildan.chrome.devtools.runTestWithRealTime |
9 | | -import org.hildan.chrome.devtools.protocol.ExperimentalChromeApi |
10 | | -import org.hildan.chrome.devtools.protocol.RequestNotSentException |
| 5 | +import org.hildan.chrome.devtools.protocol.* |
11 | 6 | import org.hildan.chrome.devtools.sessions.* |
12 | 7 | import org.junit.jupiter.api.Test |
13 | | -import org.testcontainers.Testcontainers |
| 8 | +import org.testcontainers.* |
14 | 9 | import kotlin.test.* |
15 | 10 | import kotlin.time.Duration.Companion.seconds |
16 | 11 |
|
@@ -110,29 +105,6 @@ abstract class LocalIntegrationTestBase : IntegrationTestBase() { |
110 | 105 | } |
111 | 106 | } |
112 | 107 |
|
113 | | - @OptIn(ExperimentalChromeApi::class) |
114 | | - @Test |
115 | | - fun parallelPages() = runTestWithRealTime { |
116 | | - withResourceServerForTestcontainers { baseUrl -> |
117 | | - chromeWebSocket().use { browser -> |
118 | | - // we want all coroutines to finish before we close the browser session |
119 | | - withContext(Dispatchers.IO) { |
120 | | - repeat(20) { |
121 | | - launch { |
122 | | - browser.newPage().use { page -> |
123 | | - page.goto("$baseUrl/test-server-pages/basic.html") |
124 | | - page.runtime.getHeapUsage() |
125 | | - val docRoot = page.dom.getDocumentRootNodeId() |
126 | | - page.dom.describeNode(DescribeNodeRequest(docRoot, depth = 2)) |
127 | | - page.storage.getCookies() |
128 | | - } |
129 | | - } |
130 | | - } |
131 | | - } |
132 | | - } |
133 | | - } |
134 | | - } |
135 | | - |
136 | 108 | @OptIn(ExperimentalChromeApi::class) |
137 | 109 | @Test |
138 | 110 | fun sessionThrowsIOExceptionIfAlreadyClosed() = runTestWithRealTime { |
|
0 commit comments