Download tasks/format-code-task-000055/tests/test.patch from FineEnvs/MiMo-V2.6-RL-harbor-code: direct link, hf CLI and curl.
- Browser
- Download file 6.48 kB
-
https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/main/tasks/format-code-task-000055/tests/test.patch
- Command line
-
hf download hf://datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/tasks/format-code-task-000055/tests/test.patch
-
curl -L -o test.patch https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/main/tasks/format-code-task-000055/tests/test.patch
6.48 kB
| diff --git a/packages/core/test/sessionManagement.spec.ts b/packages/core/test/sessionManagement.spec.ts | |
| index ca1cc9bd5c..ef4b612068 100644 | |
| --- a/packages/core/test/sessionManagement.spec.ts | |
| +++ b/packages/core/test/sessionManagement.spec.ts | |
| describe('startSessionManagement', () => { | |
| expectSessionIdToBeDefined(session) | |
| expectTrackingTypeToBe(session, FIRST_PRODUCT_KEY, FakeTrackingType.TRACKED) | |
| }) | |
| + | |
| + it('should not renew on visibility after expiration', () => { | |
| + const session = startSessionManagement(FIRST_PRODUCT_KEY, () => ({ | |
| + isTracked: true, | |
| + trackingType: FakeTrackingType.TRACKED, | |
| + })) | |
| + const renewSessionSpy = jasmine.createSpy() | |
| + session.renewObservable.subscribe(renewSessionSpy) | |
| + | |
| + expireSession() | |
| + | |
| + jasmine.clock().tick(VISIBILITY_CHECK_DELAY) | |
| + | |
| + expect(renewSessionSpy).not.toHaveBeenCalled() | |
| + expectSessionIdToNotBeDefined(session) | |
| + }) | |
| }) | |
| describe('multiple startSessionManagement calls', () => { | |
| diff --git a/packages/rum/test/rum.spec.ts b/packages/rum/test/rum.spec.ts | |
| index 101b0ada03..4c85b3a787 100644 | |
| --- a/packages/rum/test/rum.spec.ts | |
| +++ b/packages/rum/test/rum.spec.ts | |
| import sinon from 'sinon' | |
| import { LifeCycle, LifeCycleEventType } from '../src/lifeCycle' | |
| import { handleResourceEntry, RumEvent, RumResourceEvent } from '../src/rum' | |
| -import { PAGE_ACTIVITY_VALIDATION_DELAY } from '../src/trackPageActivities' | |
| import { UserAction, UserActionType } from '../src/userActionCollection' | |
| -import { SESSION_KEEP_ALIVE_INTERVAL, THROTTLE_VIEW_UPDATE_PERIOD } from '../src/viewCollection' | |
| +import { SESSION_KEEP_ALIVE_INTERVAL } from '../src/viewCollection' | |
| import { setup, TestSetupBuilder } from './specHelper' | |
| function getEntry(addRumEvent: (event: RumEvent) => void, index: number) { | |
| describe('rum session', () => { | |
| it('when tracked without resources should not track resources', () => { | |
| const { server, stubBuilder, lifeCycle } = setupBuilder | |
| .withSession({ | |
| - getId: () => undefined, | |
| + getId: () => '1234', | |
| isTracked: () => true, | |
| isTrackedWithResource: () => false, | |
| }) | |
| describe('rum session', () => { | |
| let isTracked = true | |
| const { server, stubBuilder } = setupBuilder | |
| .withSession({ | |
| - getId: () => undefined, | |
| + getId: () => '1234', | |
| isTracked: () => isTracked, | |
| isTrackedWithResource: () => isTracked, | |
| }) | |
| describe('rum session', () => { | |
| let isTrackedWithResource = true | |
| const { server, lifeCycle } = setupBuilder | |
| .withSession({ | |
| - getId: () => undefined, | |
| + getId: () => '1234', | |
| isTracked: () => true, | |
| isTrackedWithResource: () => isTrackedWithResource, | |
| }) | |
| describe('rum session', () => { | |
| expect(subsequentRequests[0].session_id).toEqual('43') | |
| expect(subsequentRequests[0].view.id).not.toEqual(initialRequests[0].view.id) | |
| }) | |
| + | |
| + it('when switching from not tracked to tracked, it should not send events without sessionId', () => { | |
| + let sessionId = undefined as string | undefined | |
| + let isTracked = false | |
| + const { server, lifeCycle } = setupBuilder | |
| + .withSession({ | |
| + getId: () => sessionId, | |
| + isTracked: () => isTracked, | |
| + isTrackedWithResource: () => false, | |
| + }) | |
| + .withViewCollection() | |
| + .build() | |
| + | |
| + server.requests = [] | |
| + lifeCycle.notify(LifeCycleEventType.ERROR_COLLECTED, FAKE_ERROR as ErrorMessage) | |
| + expect(getServerRequestBodies<ExpectedRequestBody>(server).length).toEqual(0) | |
| + | |
| + | |
| + isTracked = true | |
| + sessionId = '1234' | |
| + | |
| + lifeCycle.notify(LifeCycleEventType.ERROR_COLLECTED, FAKE_ERROR as ErrorMessage) | |
| + expect(getServerRequestBodies<ExpectedRequestBody>(server).length).toEqual(0) | |
| + }) | |
| }) | |
| describe('rum session keep alive', () => { | |
| describe('rum session keep alive', () => { | |
| .withFakeServer() | |
| .withFakeClock() | |
| .withSession({ | |
| - getId: () => undefined, | |
| + getId: () => '1234', | |
| isTracked: () => isSessionTracked, | |
| isTrackedWithResource: () => true, | |
| }) | |
| describe('rum global context', () => { | |
| let setupBuilder: TestSetupBuilder | |
| beforeEach(() => { | |
| - const session = { | |
| - getId: () => undefined, | |
| - isTracked: () => true, | |
| - isTrackedWithResource: () => true, | |
| - } | |
| setupBuilder = setup() | |
| .withFakeServer() | |
| .withRum() | |
| diff --git a/packages/rum/test/specHelper.ts b/packages/rum/test/specHelper.ts | |
| index 6d36a008d0..e6d94780a6 100644 | |
| --- a/packages/rum/test/specHelper.ts | |
| +++ b/packages/rum/test/specHelper.ts | |
| export interface TestIO { | |
| export function setup(): TestSetupBuilder { | |
| let session = { | |
| - getId: () => undefined as string | undefined, | |
| + getId: () => '1234' as string | undefined, | |
| isTracked: () => true, | |
| isTrackedWithResource: () => true, | |
| } | |
| diff --git a/mimo_build_env.tar.gz.b64 b/mimo_build_env.tar.gz.b64 | |
| new file mode 100644 | |
| --- /dev/null | |
| +++ b/mimo_build_env.tar.gz.b64 | |
| +H4sIAAAAAAAAA+2W30/bMBDH+5y/wmOT0krESUoDUqU+DIbUSaNFgzeEqvw40kBiZ7YDTIj/fZeE | |
| +lgJjoAmGJu7z4tj+Xu/sO9vlUZXlyQzEudt5LTxkKwiaFrnfNt9+0Pf7njcIfL/j+X6w5XVY8GoR | |
| +rVBpEyrGOkpK8yfdU/P/Kfw2/2ehKkKOu5GC4bEUJ/xUv4iPOsGbg8Fj+fcH3uYy/56HdeIHgw2/ | |
| +w7wX8f4E7zz/mGdtWBmaORsxBT+qTEHXrvt2z2onm7rYDjXsYE2sqjh3DWjjViIzN9UToaypHbS2 | |
| +CplUOXC4LKUyGi1PKhGbTIpurcjSHruyGGu/uQbTrbuMcc7vuFxvRutf3sewhk2w/FRmojubJZkS | |
| +YQHrDIOxe63yJMtBD9lR02EMFxOfhSloN5YK2og1aI1x7IUCJwoQhusSYm60vf7ASlVFa4Qfz5HV | |
| +kjHkJahb4XHblApKJWN0LhVGePVXEeLK7AuIahv7+JnhPtfmbuy/sbpuG1wHphTqRRzZtdFiPlLy | |
| +Qt+M78yVLGAMYYL50BN5EIokkpcLaYwnTxbfQqyJOaxuxyN2t4K2GIbsnodlUrAE8jBtYnAcIR19 | |
| +1/FyFU1z3bOurbc+hW/Hyv1fV8AslkWB28X1/OV8PPX+b/jB8v7f2Orj/T/Y9D26//8FHz+4USZc | |
| +PFBzK05YUwQRJFZ7abP9z4fj0ZorS+MKmYDT79fy4ad6fG0hmky/7M6m+4dfp5OD0ZrjyBKE1rmT | |
| +QxrGPx288s6zBNRSvzP+Pt3bnW1/nYzcSqsmgFTKNAcnbk60gzmJcrBEedm+PqxOkmEP35tcxmG+ | |
| ++LPyjo8xQRAEQRAEQRAEQRAEQRAEQRAEQRBE5xeiAJkoACgAAA== | |
| diff --git a/mimo_test_command.sh b/mimo_test_command.sh | |
| new file mode 100755 | |
| --- /dev/null | |
| +++ b/mimo_test_command.sh | |
| +#!/usr/bin/env bash | |
| + | |
| +set -uo pipefail | |
| +cd /testbed || exit 1 | |
| +base64 -d mimo_build_env.tar.gz.b64 | tar -xzf - -C /testbed || exit 1 | |
| +exec bash -lc 'cd /testbed && bash -eo pipefail /testbed/.build_env/test_command.sh' | |