Skip to content

Commit 7bf013c

Browse files
committed
Fix test config
1 parent 3c56f8c commit 7bf013c

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

Directory.Build.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Authors>@jet @eulerfx @eiriktsarpalis @michaelliao5 and contributors</Authors>
44
<Company>Jet.com</Company>
55
<Description>Lightweight F# wrapper for Confluent.Kafka</Description>
6-
<PackageProjectUrl>https://github.com/jet/confluent-kafka-fsharp</PackageProjectUrl>
7-
<PackageTags>kafka;fsharp</PackageTags>
6+
<PackageProjectUrl>https://github.com/jet/Jet.ConfluentKafka.FSharp</PackageProjectUrl>
7+
<PackageTags>kafka fsharp</PackageTags>
88
<PackageLicense>Apache-2.0</PackageLicense>
99
<Copyright>Copyright © 2016-9</Copyright>
1010

@@ -31,5 +31,4 @@
3131
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3232
</Content>
3333
</ItemGroup>
34-
3534
</Project>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ Please note the [QuickStart](quickstart) is probably the best way to gain an ove
4242

4343
NB The tests are reliant on a `TEST_KAFKA_BROKER` environment variable pointing to a test environment that will auto-create ephemeral Kafka Topics as required by the tests (each test run writes to a guid-named topic)
4444

45-
### build, including tests
45+
### build, including tests on net461 and netcoreapp2.1
4646

47-
dotnet build build.proj
47+
dotnet build build.proj -v n
4848

4949
## FAQ
5050

azure-pipelines.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
name: $(Rev:r)
2+
3+
# Summary:
4+
# Linux: Tests with netcoreapp2.1 using docker Kafka instance
5+
# net461 on Mono is not working, no investigation why as yet, but local run validates it
6+
# Windows: Builds and emits nupkg as artifacts
7+
# MacOS: Builds only
8+
29
jobs:
310
- job: Windows
411
pool:
@@ -28,7 +35,7 @@ jobs:
2835
ches/kafka
2936
sleep 15
3037
displayName: Docker kafka for integration tests
31-
- script: dotnet test build.proj
38+
- script: dotnet test build.proj -v n -p:TargetFrameworks=netcoreapp2.1 # net461 fails
3239
displayName: Run Integration tests
3340
env:
3441
TEST_KAFKA_BROKER: localhost:9092

build.proj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
<PrOption Condition =" '$(BUILD_PR)' != '%24(SYSTEM.PULLREQUEST.PULLREQUESTNUMBER)' ">/p:BUILD_PR=$(BUILD_PR) </PrOption>
1111
<PackOptions>/p:BUILD_ID=$(BUILD_ID) $(PrOption) -o $(ThisDirAbsolute)bin/nupkg</PackOptions>
12-
12+
1313
<TestOptions>--logger:trx</TestOptions>
14+
<TestOptions Condition=" '$(TargetFrameworks)' != '' ">$(TestOptions) /p:TargetFrameworks=$(TargetFrameworks)</TestOptions>
1415
</PropertyGroup>
1516

1617
<Target Name="Pack">
@@ -21,6 +22,6 @@
2122
<Exec Command="dotnet test tests/Jet.ConfluentKafka.FSharp.Integration $(Cfg) $(TestOptions)" />
2223
</Target>
2324

24-
<Target Name="Build" DependsOnTargets="VSTest;Pack" />
25+
<Target Name="Build" DependsOnTargets="Pack;VSTest" />
2526

2627
</Project>

src/Jet.ConfluentKafka.FSharp/ConfluentKafka.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ type KafkaProducer private (log: ILogger, producer : Producer<string, string>, t
104104

105105
static member Create(log : ILogger, config : KafkaProducerConfig, topic : string) =
106106
if String.IsNullOrEmpty topic then nullArg "topic"
107-
log.Information("Producing... {broker} / {topic} compression={compression} acks={acks}", config.Broker, topic, config.Compression, config.Acks)
107+
log.Information("Producing... {broker} / {topic} compression={compression:l} acks={acks}", config.Broker, topic, config.Compression, config.Acks)
108108
let producer =
109109
ProducerBuilder<string, string>(config.Kvps)
110110
.SetLogHandler(fun _p m -> log.Information("{message} level={level} name={name} facility={facility}", m.Message, m.Level, m.Name, m.Facility))

0 commit comments

Comments
 (0)