Skip to content

Commit 65e51cc

Browse files
committed
✨ feat(Transfer.Client): 成功运行Transfer中的测试代码
1 parent b6c5a1b commit 65e51cc

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

examples/Transfer.Client/Program.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.Extensions.Hosting;
99
using Microsoft.Extensions.Logging;
1010
using Orleans;
11+
using Orleans.Configuration;
1112
using Orleans.Hosting;
1213
using Transfer.IGrains.Common;
1314
using Transfer.IGrains.DTx;
@@ -177,9 +178,18 @@ private static async Task<IClusterClient> StartClientWithRetries(int initializeA
177178
try
178179
{
179180
var builder = new HostBuilder()
180-
.UseOrleansClient(clientBuilder => clientBuilder.UseLocalhostClustering())
181+
.UseOrleansClient(clientBuilder =>
182+
{
183+
clientBuilder.UseLocalhostClustering();
184+
clientBuilder.Configure<ClusterOptions>(options =>
185+
{
186+
options.ClusterId = "dev";
187+
options.ServiceId = "Transfer";
188+
});
189+
})
181190
.ConfigureLogging(logging => logging.AddConsole());
182191
host = builder.Build();
192+
await host.StartAsync();
183193
client = host.Services.GetService<IClusterClient>();
184194
Console.WriteLine("Client successfully connect to silo host");
185195
break;

0 commit comments

Comments
 (0)