sshiv012 commented on code in PR #9226:
URL: https://github.com/apache/texera/pull/9226#discussion_r4477544346


##########
amber/src/test/scala/org/apache/texera/web/resource/dashboard/hub/HubResourceSpec.scala:
##########
@@ -795,6 +795,17 @@ class HubResourceSpec
     )
   }
 
+  it should "record an anonymous view (uid 0 or none) with a NULL uid" in {
+    val id = seedWorkflow(810603, "wf_view_anonymous")
+    hub.postView(req, ViewRequest(id, Integer.valueOf(0), Wf)) shouldBe 1
+    hub.postView(req, ViewRequest(id, null, Wf)) shouldBe 2
+
+    auditRows() shouldBe Seq(
+      (null, "workflow", 810603, "view", "127.0.0.1"),
+      (null, "workflow", 810603, "view", "127.0.0.1")
+    )
+  }
+

Review Comment:
   Could we add a direct recordUserAction test that omits userId and asserts 
the stored UID is NULL? The new endpoint test passes viewerUid explicitly, so 
it doesn’t exercise the changed default argument.



##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########


Review Comment:
   The userId documentation still says “default is 0 for anonymous users.” 
Please update it to describe the new NULL default.



-- 
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