Copilot commented on code in PR #7863:
URL: https://github.com/apache/texera/pull/7863#discussion_r3837767091
##########
amber/src/test/scala/org/apache/texera/web/resource/CollaborationResourceSpec.scala:
##########
@@ -46,7 +46,19 @@ import scala.collection.mutable.ArrayBuffer
// with no external collaborators; the TryLockRequest cases that reach
// WorkflowAccessResource.hasWriteAccess additionally mix in MockTexeraDB and
// seed a workflow_user_access row so the privilege check reads a real value.
-// The lock hand-off inside myOnClose still needs SqlServer and is left
uncovered.
+// The lock hand-off inside myOnClose consults the same privilege check, so the
+// cases at the bottom of this file drive it through MockTexeraDB too, with two
+// seeded users (one WRITE, one READ) on the same workflow so the per-candidate
+// privilege test is observable.
Review Comment:
The class-level comment says the myOnClose lock hand-off tests “drive it
through MockTexeraDB … with two seeded users (one WRITE, one READ)”. In this
spec, only one test actually seeds the extra READ-only user; most myOnClose
hand-off tests only seed the WRITE user. Consider rewording this comment so it
doesn’t imply every bottom-of-file case seeds both users.
##########
amber/src/test/scala/org/apache/texera/web/resource/CollaborationResourceSpec.scala:
##########
@@ -240,6 +267,23 @@ class CollaborationResourceSpec
wIdSessionIdsMap(7) should contain theSameElementsAs Set("s1", "s2")
}
+ it should "move a session that re-registers on a different wid" in {
Review Comment:
Test name says it should “move a session that re-registers on a different
wid”, but the body explicitly avoids asserting anything about removal from the
original wid bucket (and documents that the stale entry is a known defect). To
keep the spec output accurate, consider renaming this test to reflect what it
actually asserts (e.g., that a second WIdRequest updates `sessionIdWIdMap` and
registers the session in the new bucket).
--
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]