mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-09 20:49:12 +00:00
Added health metrics for application load and database load (#2257)
* Added health metrics for application load * Added health metrics for application load * Fix unit tests * Added more metrics * Added few comments * Added DatabaseLoad Scenario and address comments * Fix unit tests * fix unit tests * Fix unit tests * fix unit tests * fix the mock * Fix unit tests
This commit is contained in:
@@ -35,6 +35,15 @@ import * as ViewModels from "../../../Contracts/ViewModels";
|
||||
import { updateUserContext } from "../../../UserContext";
|
||||
import Explorer from "../../Explorer";
|
||||
|
||||
jest.mock("rx-jupyter", () => ({
|
||||
sessions: {
|
||||
create: jest.fn(),
|
||||
},
|
||||
contents: {
|
||||
JupyterContentProvider: jest.fn().mockImplementation(() => ({})),
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock("Common/dataAccess/queryDocuments", () => ({
|
||||
queryDocuments: jest.fn(() => ({
|
||||
// Omit headers, because we can't mock a private field and we don't need to test it
|
||||
|
||||
@@ -19,6 +19,15 @@ import { act } from "react-dom/test-utils";
|
||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||
import Explorer from "../../Explorer";
|
||||
|
||||
jest.mock("rx-jupyter", () => ({
|
||||
sessions: {
|
||||
create: jest.fn(),
|
||||
},
|
||||
contents: {
|
||||
JupyterContentProvider: jest.fn().mockImplementation(() => ({})),
|
||||
},
|
||||
}));
|
||||
|
||||
jest.requireActual("Explorer/Controls/Editor/EditorReact");
|
||||
|
||||
const PROPERTY_VALUE = "__SOME_PROPERTY_VALUE__";
|
||||
|
||||
Reference in New Issue
Block a user