Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TestDeltaConnectionServer to LocalDeltaConnectionServer in local-server - part 1 #1339

Merged
merged 1 commit into from
Feb 25, 2020
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
11 changes: 5 additions & 6 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The package name is changed to `fluid-common-utils` to make it parallel to `flui

### `fluid-local-test-server` package move and rename

The following classes / interfaces in have moved from `@microsoft/fluid-local-test-server` to `@microsoft/fluid-test-driver` in `./packages`:
The following classes / interfaces have moved from `@microsoft/fluid-local-test-server` to `@microsoft/fluid-test-driver` in `./packages`:

```text
DocumentDeltaEventManager
Expand All @@ -25,12 +25,11 @@ TestDocumentServiceFactory
TestResolver
```

The following classes / interfaces have moved from `@microsoft/fluid-local-test-server` in `./packages` to `@microsoft/fluid-server-local-server` in `./server`:

The following classes / interfaces have been renamed and have moved from `@microsoft/fluid-local-test-server` in `./packages` to `@microsoft/fluid-server-local-server` in `./server`:
```text
ITestDeltaConnectionServer
TestDeltaConnectionServer
TestReservationManager
ITestDeltaConnectionServer -> ILocalDeltaConnectionServer
TestDeltaConnectionServer -> LocalDeltaConnectionServer
TestReservationManager -> LocalReservationManager
```

The following packages have been renamed in `./packages`:
Expand Down
4 changes: 2 additions & 2 deletions server/routerlicious/packages/local-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* Licensed under the MIT License.
*/

export * from "./testDeltaConnectionServer";
export * from "./testReservationManager";
export * from "./localDeltaConnectionServer";
export * from "./localReservationManager";
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ import {
DebugLogger,
} from "@microsoft/fluid-server-test-utils";
import { configureWebSocketServices} from "@microsoft/fluid-server-lambdas";
import { TestReservationManager } from "./testReservationManager";
import { LocalReservationManager } from "./localReservationManager";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add this to breaking? maybe lump it in with the package change section, so it's all together


/**
* Items needed for handling deltas.
*/
export interface ITestDeltaConnectionServer {
export interface ILocalDeltaConnectionServer {
webSocketServer: IWebSocketServer;
databaseManager: IDatabaseManager;
testDbFactory: ITestDbFactory;
hasPendingWork(): Promise<boolean>;
}

/**
* Implementation of order manager for testing.
* Implementation of order manager.
*/
class TestOrderManager implements IOrdererManager {
private readonly orderersP: Promise<IOrderer>[] = [];
Expand Down Expand Up @@ -82,13 +82,13 @@ class TestOrderManager implements IOrdererManager {
}

/**
* Implementation of delta connection server for testing.
* Implementation of local delta connection server.
*/
export class TestDeltaConnectionServer implements ITestDeltaConnectionServer {
export class LocalDeltaConnectionServer implements ILocalDeltaConnectionServer {
/**
* Creates and returns a delta connection server for testing.
* Creates and returns a local delta connection server.
*/
public static create(testDbFactory: ITestDbFactory = new TestDbFactory({})): ITestDeltaConnectionServer {
public static create(testDbFactory: ITestDbFactory = new TestDbFactory({})): ILocalDeltaConnectionServer {
const nodesCollectionName = "nodes";
const documentsCollectionName = "documents";
const deltasCollectionName = "deltas";
Expand All @@ -110,7 +110,7 @@ export class TestDeltaConnectionServer implements ITestDeltaConnectionServer {
databaseManager,
testTenantManager);

const logger = DebugLogger.create("fluid-server:TestDeltaConnectionServer");
const logger = DebugLogger.create("fluid-server:LocalDeltaConnectionServer");

const nodeFactory = new LocalNodeFactory(
"os",
Expand All @@ -125,7 +125,7 @@ export class TestDeltaConnectionServer implements ITestDeltaConnectionServer {
16 * 1024,
logger);

const reservationManager = new TestReservationManager(
const reservationManager = new LocalReservationManager(
nodeFactory,
mongoManager,
reservationsCollectionName);
Expand All @@ -143,7 +143,7 @@ export class TestDeltaConnectionServer implements ITestDeltaConnectionServer {
new DefaultMetricClient(),
logger);

return new TestDeltaConnectionServer(webSocketServer, databaseManager, testOrderer, testDbFactory);
return new LocalDeltaConnectionServer(webSocketServer, databaseManager, testOrderer, testDbFactory);
}

private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "@microsoft/fluid-server-memory-orderer";
import { ICollection, MongoManager } from "@microsoft/fluid-server-services-core";

export class TestReservationManager extends EventEmitter implements IReservationManager {
export class LocalReservationManager extends EventEmitter implements IReservationManager {
constructor(
private readonly nodeFactory: IConcreteNodeFactory,
private readonly mongoManager: MongoManager,
Expand Down