Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"test:load:50": "LOG_LEVEL=info vitest run --project=load --testNamePattern='Load Test: 50 Concurrent Clients'",
"test:load:100": "LOG_LEVEL=info vitest run --project=load --testNamePattern='Load Test: 100 Concurrent Clients'",
"test:load:200": "LOG_LEVEL=info vitest run --project=load --testNamePattern='Load Test: 200 Concurrent Clients'",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint . --ext .ts,.tsx --max-warnings=0",
"prepare": "husky"
},
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions tests/client/tutor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ describe("useTutor", () => {

it("resets a pinned dialog when the active Course Content revision changes", async () => {
setActiveExternalExampleContext({ repository: "owner/repo", ref: "main", revision: "a".repeat(40), exampleId: "arrays" });
const fetchMock = vi.spyOn(globalThis, "fetch").mockImplementation(async (input, init) => {
const fetchMock = vi.spyOn(globalThis, "fetch").mockImplementation(async (input) => {
if (String(input) === "/api/config") return new Response(JSON.stringify({ tutor: { provider: "kiconnect" } }), { status: 200 });
const body = JSON.parse(String(init?.body ?? "{}")) as Record<string, unknown>;
if (String(input) === "/api/tutor/question") {
return new Response(JSON.stringify({
question: "Frage",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/concurrent-50-clients.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ vi.mock("../../server/services/registry-manager", () => ({

vi.mock("../../server/services/compiler-with-fallback", () => {
class MockCompilerWithFallback {
async compile(code: string) {
async compile() {
return { success: true, firmware: "deadbeef", errors: [], parsed: [] };
}
async shutdown() {
Expand Down
1 change: 0 additions & 1 deletion tests/server/load-suite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ function createLoadTestSuite(
const outputDir = process.env.LOAD_TEST_OUTPUT_DIR;
if (outputDir) {
try {
const { saveTestMetrics } = await import('./load-suite.test');
// saveTestMetrics(testResults, outputDir, numClients);
console.log(`[LoadTest] Would save metrics to ${outputDir} (disabled to avoid circular dependency)`);
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion tests/server/routes/shutdown-websocket.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from "express";
import { createServer, type Server } from "node:http";
import type { Server } from "node:http";
import type { AddressInfo } from "node:net";
import { afterEach, describe, expect, it, vi } from "vitest";
import { WebSocket } from "ws";
Expand Down
4 changes: 1 addition & 3 deletions tests/server/services/sandbox/cleanup-phase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
* - Error-Pfade und No-op-Pfade
*/

import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { describe, it, expect, vi } from "vitest";
import { flushMessageQueue, flushBatchers, cleanupDockerContainer } from "../../../../server/services/sandbox/execution-phases/cleanup-phase";
import type { ExecutionState } from "../../../../server/services/sandbox/execution-manager";
import type { PinStateBatcher } from "../../pin-state-batcher";
import type { SerialOutputBatcher } from "../../serial-output-batcher";

// Mocks f眉r Dependencies
const createMockLogger = () => ({
Expand Down
2 changes: 1 addition & 1 deletion tests/server/services/scalability-stress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ describe("Scalability stress: SandboxStartSemaphore", () => {
let peakActive = 0;
const queuings: number[] = [];

const promises = Array.from({ length: 10 }, (_, i) =>
const promises = Array.from({ length: 10 }, () =>
(async () => {
const start = Date.now();
const release = await semaphore.acquire(() => {
Expand Down
2 changes: 1 addition & 1 deletion tests/server/services/server-metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("Server Metrics (Phase 3.9 Observability)", () => {

it("should calculate CPU percentage from two samples", () => {
// First call initializes baseline
const metrics1 = getProcessMetrics();
getProcessMetrics();

// Second call should have CPU data
const metrics2 = getProcessMetrics();
Expand Down
Loading