mengw15 commented on code in PR #7254:
URL: https://github.com/apache/texera/pull/7254#discussion_r3699454356


##########
amber/src/test/scala/org/apache/texera/web/resource/CollaborationResourceSpec.scala:
##########
@@ -42,10 +51,26 @@ class CollaborationResourceSpec
     extends AnyFlatSpec
     with Matchers
     with MockFactory
-    with BeforeAndAfterEach {
+    with BeforeAndAfterAll
+    with BeforeAndAfterEach
+    with MockTexeraDB {

Review Comment:
   `MockTexeraDB` boots its embedded Postgres once per spec in `beforeAll` 
(it's a trait with a per-instance `var`, not a JVM singleton), so splitting 
wouldn't reduce the boot count — a merged spec boots 1; a split would be 0 here 
+ 1 in the new lock spec = the same single boot, just relocated, plus 
duplicated `mockSession`/`send` scaffolding. The boot is a one-time `beforeAll` 
cost, so the pure-websocket tests don't each pay it; only their `beforeEach` 
runs a couple of no-op cleanup deletes. Keeping it in one spec per the issue's 
"extend the existing spec", and I've refreshed the header comment that still 
said "no database".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to