Skip to content

Commit

Permalink
bump protocol version to 47 (pyro 4.26)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Jun 25, 2014
1 parent b9220ff commit 249290d
Show file tree
Hide file tree
Showing 10 changed files with 1,071 additions and 1,017 deletions.
554 changes: 277 additions & 277 deletions README.txt

Large diffs are not rendered by default.

25 changes: 23 additions & 2 deletions dotnet/Pyrolite.Tests/Pyro/MessageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,35 @@ public void testRecvAnnotations()
}

[Test]
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 25390")]
public void testProtocolVersion()
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 25455")]
public void testProtocolVersionKaputt()
{
byte[] msg = new Message(Message.MSG_RESULT, new byte[0], this.serializer_id, 0, 1, null).to_bytes().Take(Message.HEADER_SIZE).ToArray();
msg[4] = 99; // screw up protocol version in message header
msg[5] = 111; // screw up protocol version in message header
Message.from_header(msg);
}

[Test]
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 46")]
public void testProtocolVersionsNotSupported1()
{
byte[] msg = new Message(Message.MSG_RESULT, new byte[0], this.serializer_id, 0, 1, null).to_bytes().Take(Message.HEADER_SIZE).ToArray();
msg[4] = 0;
msg[5] = 46;
Message.from_header(msg);
}

[Test]
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 48")]
public void testProtocolVersionsNotSupported2()
{
byte[] msg = new Message(Message.MSG_RESULT, new byte[0], this.serializer_id, 0, 1, null).to_bytes().Take(Message.HEADER_SIZE).ToArray();
msg[4] = 0;
msg[5] = 48;
Message.from_header(msg);
}

[Test]
public void testHmac()
{
Expand Down
2 changes: 1 addition & 1 deletion dotnet/Pyrolite/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.*")]
[assembly: AssemblyVersion("3.1.*")]
4 changes: 2 additions & 2 deletions dotnet/Pyrolite/Pyro/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public enum SerializerType {
public static bool SERPENT_SET_LITERALS = false; // set to true if talking to Python 3.2 or newer
public static SerializerType SERIALIZER = SerializerType.serpent;

public const int PROTOCOL_VERSION = 46; // Pyro 4.22 and newer, cannot be modified
public const string PYROLITE_VERSION="3.0";
public const int PROTOCOL_VERSION = 47; // Pyro 4.26
public const string PYROLITE_VERSION="3.1";
}

}
Loading

0 comments on commit 249290d

Please sign in to comment.